|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jpacriteria.tuple.Tuple<T>
public class Tuple<T>
Tuple implementation useful to keep complex values in collections (both as keys or as values).
Nested Class Summary | |
---|---|
static class |
Tuple.Pair<FIRST,SECOND>
Two elements tuple. |
static class |
Tuple.Triplet<FIRST,SECOND,THIRD>
Three elements tuple. |
Constructor Summary | |
---|---|
Tuple(T... objects)
Creates tuple from objects. |
Method Summary | ||
---|---|---|
java.util.List<T> |
asList()
|
|
int |
compareTo(Tuple<T> that)
Compares tuples |
|
boolean |
equals(java.lang.Object obj)
|
|
T |
get(int index)
Gets index-th element. |
|
static
|
getPair(A a,
B b)
|
|
static
|
getTriplet(A a,
B b,
C c)
|
|
static
|
getTuple(X... objects)
|
|
int |
hashCode()
|
|
T |
set(int index,
T object)
Sets index-th element. |
|
int |
size()
Returns elements count. |
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Tuple(T... objects)
objects
- Method Detail |
---|
public static <X> Tuple<X> getTuple(X... objects)
public static <A,B> Tuple.Pair<A,B> getPair(A a, B b)
public static <A,B,C> Tuple.Triplet<A,B,C> getTriplet(A a, B b, C c)
public T get(int index)
index
-
public T set(int index, T object)
index
- object
-
public int size()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(Tuple<T> that)
compareTo
in interface java.lang.Comparable<Tuple<T>>
that
-
public java.util.List<T> asList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |