View Javadoc
1   package net.avcompris.commons3.testutil;
2   
3   import static com.google.common.base.Preconditions.checkNotNull;
4   
5   public final class Four<T, U, V, W> {
6   
7   	private final T left;
8   	private final U middleLeft;
9   	private final V middleRight;
10  	private final W right;
11  
12  	private Four(final T left, final U middleLeft, final V middleRight, final W right) {
13  
14  		this.left = checkNotNull(left, "left");
15  		this.middleLeft = checkNotNull(middleLeft, "middleLeft");
16  		this.middleRight = checkNotNull(middleRight, "middleRight");
17  		this.right = checkNotNull(right, "right");
18  	}
19  
20  	public T getLeft() {
21  
22  		return left;
23  	}
24  
25  	public U getMiddleLeft() {
26  
27  		return middleLeft;
28  	}
29  
30  	public V getMiddleRight() {
31  
32  		return middleRight;
33  	}
34  
35  	public W getRight() {
36  
37  		return right;
38  	}
39  
40  	public static <T, U, V, W> Four<T, U, V, W> of(final T left, final U middleLeft, final V middleRight,
41  			final W right) {
42  
43  		return new Four<T, U, V, W>(left, middleLeft, middleRight, right);
44  	}
45  }