Package org.organicdesign.fp.tuple
Class Tuple12<A,B,C,D,E,F,G,H,I,J,K,L>
- java.lang.Object
-
- org.organicdesign.fp.tuple.Tuple12<A,B,C,D,E,F,G,H,I,J,K,L>
-
- All Implemented Interfaces:
Serializable
public class Tuple12<A,B,C,D,E,F,G,H,I,J,K,L> extends Object implements Serializable
Holds 12 items of potentially different types. Designed to let you easily create immutable subclasses (to give your data structures meaningful names) with correct equals(), hashCode(), and toString() methods.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description A_1()Returns the 1st fieldJ_10()Returns the 10th fieldK_11()Returns the 11th fieldL_12()Returns the 12th fieldB_2()Returns the 2nd fieldC_3()Returns the 3rd fieldD_4()Returns the 4th fieldE_5()Returns the 5th fieldF_6()Returns the 6th fieldG_7()Returns the 7th fieldH_8()Returns the 8th fieldI_9()Returns the 9th fieldbooleanequals(Object other)inthashCode()static <A,B,C,D,E,F,G,H,I,J,K,L>
@NotNull Tuple12<A,B,C,D,E,F,G,H,I,J,K,L>of(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l)Public static factory method@NotNull StringtoString()
-
-
-
Field Detail
-
_1
protected final A _1
-
_2
protected final B _2
-
_3
protected final C _3
-
_4
protected final D _4
-
_5
protected final E _5
-
_6
protected final F _6
-
_7
protected final G _7
-
_8
protected final H _8
-
_9
protected final I _9
-
_10
protected final J _10
-
_11
protected final K _11
-
_12
protected final L _12
-
-
Constructor Detail
-
Tuple12
protected Tuple12(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l)
Constructor is protected (not public) for easy inheritance. Josh Bloch's "Item 1" says public static factory methods are better than constructors because they have names, they can return an existing object instead of a new one, and they can return a subtype. Therefore, you have more flexibility with a static factory as part of your public API then with a public constructor.
-
-
Method Detail
-
of
@NotNull public static <A,B,C,D,E,F,G,H,I,J,K,L> @NotNull Tuple12<A,B,C,D,E,F,G,H,I,J,K,L> of(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l)
Public static factory method
-
_1
public A _1()
Returns the 1st field
-
_2
public B _2()
Returns the 2nd field
-
_3
public C _3()
Returns the 3rd field
-
_4
public D _4()
Returns the 4th field
-
_5
public E _5()
Returns the 5th field
-
_6
public F _6()
Returns the 6th field
-
_7
public G _7()
Returns the 7th field
-
_8
public H _8()
Returns the 8th field
-
_9
public I _9()
Returns the 9th field
-
_10
public J _10()
Returns the 10th field
-
_11
public K _11()
Returns the 11th field
-
_12
public L _12()
Returns the 12th field
-
-