|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.staccatocommons.lang.tuple.AbstractTuple
net.sf.staccatocommons.lang.tuple.Triple<A,B,C>
A - B - C - @Value
@Conditionally(value={net.sf.staccatocommons.restrictions.value.Immutable.class,java.io.Serializable.class})
public final class Triple<A,B,C>
Three-components AbstractTuple.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.sf.staccatocommons.lang.tuple.AbstractTuple |
|---|
AbstractTuple.TupleState<A> |
| Constructor Summary | |
|---|---|
Triple(A first,
B second,
C third)
Creates a new Triple |
|
| Method Summary | |
|---|---|
A |
_0()
|
B |
_1()
|
C |
_2()
|
int |
compareTo(net.sf.staccatocommons.defs.tuple.Tuple3<A,B,C> other)
|
boolean |
equals(Object obj)
|
A |
first()
|
int |
hashCode()
|
net.sf.staccatocommons.defs.tuple.Tuple3<B,C,A> |
rotateLeft()
Rotates this Triple components to left, creating a new one where
the first component is placed at the third position, an the rests, shifted
right. |
net.sf.staccatocommons.defs.tuple.Tuple3<C,A,B> |
rotateRight()
Rotates this Triple components to right, creating a new one where
the third component is placed at the first position, an the rests, shifted
right. |
B |
second()
|
C |
third()
|
Object[] |
toArray()
Converts this tuple into an array |
String |
toString()
|
| Methods inherited from class net.sf.staccatocommons.lang.tuple.AbstractTuple |
|---|
toList |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sf.staccatocommons.defs.partial.ToListAware |
|---|
toList |
| Constructor Detail |
|---|
public Triple(A first,
B second,
C third)
Triple
first - 1st component. Nullablesecond - 2nd component. Nullablethird - 3rd component. Nullable.| Method Detail |
|---|
public A first()
first in interface net.sf.staccatocommons.defs.partial.FirstAware<A>public B second()
second in interface net.sf.staccatocommons.defs.partial.SecondAware<B>public C third()
third in interface net.sf.staccatocommons.defs.partial.ThirdAware<C>public A _0()
_0 in interface net.sf.staccatocommons.defs.partial.FirstAware<A>public B _1()
_1 in interface net.sf.staccatocommons.defs.partial.SecondAware<B>public C _2()
_2 in interface net.sf.staccatocommons.defs.partial.ThirdAware<C>@NonNull public net.sf.staccatocommons.defs.tuple.Tuple3<B,C,A> rotateLeft()
Rotates this Triple components to left, creating a new one where
the first component is placed at the third position, an the rests, shifted
right.
Given a triple whose components a, b, c implement appropriately equals
method, the following is always true
_(a,b,c).rotateLeft().equals(_(b,c,a))
rotateLeft in interface net.sf.staccatocommons.defs.tuple.Tuple3<A,B,C>Triple, with its components rotated to left@NonNull public net.sf.staccatocommons.defs.tuple.Tuple3<C,A,B> rotateRight()
Rotates this Triple components to right, creating a new one where
the third component is placed at the first position, an the rests, shifted
right.
Given a triple whose components a, b, c implement appropriately equals
method, the following is always true
_(a,b,c).rotateLeft().equals(_(c,b,a))
rotateRight in interface net.sf.staccatocommons.defs.tuple.Tuple3<A,B,C>Triple, with its components rotated to rightpublic String toString()
toString in class Object@NonNull public Object[] toArray()
AbstractTuple
toArray in interface net.sf.staccatocommons.defs.partial.ToListAware<Object>toArray in class AbstractTuplepublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int compareTo(net.sf.staccatocommons.defs.tuple.Tuple3<A,B,C> other)
compareTo in interface Comparable<net.sf.staccatocommons.defs.tuple.Tuple3<A,B,C>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||