T1
- type of first elementT2
- type of second elementpublic class Tuple2<T1,T2> extends ITuple2.Base<T1,T2> implements java.io.Serializable
Indexable.viewTuple(ITuple2)
will come to help.
Note that this class is automatically created by tools.TupleClassCreator
(not yet public).NTuple2
,
Serialized FormITuple2.Base<T1,T2>
Modifier and Type | Method and Description |
---|---|
T1 |
_1()
Get the first element.
|
T2 |
_2()
Get the second element.
|
Tuple2<T2,T1> |
_21()
Create a new 2-tuple from this one where the elements are ordered: 2nd, 1st.
|
Tuple2<T1,T2> |
frozenNotNull()
Convert this into an object of a concrete tuple implementation.
|
<T> Tuple3<T,T1,T2> |
i1(T e1)
Create a 3-tuple from this 2-tuple by inserting a new first element.
|
<T> Tuple3<T1,T,T2> |
i2(T e2)
Create a 3-tuple from this 2-tuple by inserting a new second element.
|
<T> Tuple3<T1,T2,T> |
i3(T e3)
Create a 3-tuple from this 2-tuple by adding a new third element.
|
java.lang.String |
toString() |
<E1> Tuple2<E1,T2> |
x1(E1 e1)
Create a 2-tuple from this one where the first element is exchanged.
|
<E2> Tuple2<T1,E2> |
x2(E2 e2)
Create a 2-tuple from this one where the second element is exchanged.
|
asBase, equals, hashCode
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
concat1, concat2, concat3, concat4, concat5, concat6, concat7, concat8, concatPred1, concatPred2, concatPred3, concatPred4, concatPred5, concatPred6, concatPred7, concatPred8, concatProc1, concatProc2, concatProc3, concatProc4, concatProc5, concatProc6, concatProc7, concatProc8, equals, frozen, hash, invoke, sendTo, testBy, toString, toString, view
@NotNull public Tuple2<T2,T1> _21()
ITuple2
@NotNull public Tuple2<T1,T2> frozenNotNull()
ITuple2
null
elements, but if this interface has null
elements this method
will throw a NullPointerException
.
See ITuple2.frozen()
for a method which will not throw exceptions.
frozenNotNull
in interface ITuple2<T1,T2>
@NotNull public <E1> Tuple2<E1,T2> x1(@NotNull E1 e1)
E1
- type of exchanged first elemente1
- new first element@NotNull public <E2> Tuple2<T1,E2> x2(@NotNull E2 e2)
E2
- type of exchanged second elemente2
- new second element@NotNull public <T> Tuple3<T,T1,T2> i1(@NotNull T e1)
T
- new element typee1
- new element@NotNull public <T> Tuple3<T1,T,T2> i2(@NotNull T e2)
T
- new element typee2
- new element@NotNull public <T> Tuple3<T1,T2,T> i3(@NotNull T e3)
T
- new element typee3
- new element@NotNull public java.lang.String toString()
toString
in class ITuple2.Base<T1,T2>