|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<Object>
com.healthmarketscience.common.util.Tuple1<ObjType0>
com.healthmarketscience.common.util.Tuple2<ObjType0,ObjType1>
com.healthmarketscience.common.util.Tuple3<ObjType0,ObjType1,ObjType2>
public class Tuple3<ObjType0,ObjType1,ObjType2>
Simple class for holding 3 typed objects.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.healthmarketscience.common.util.Tuple1 |
---|
Tuple1.Accessor, Tuple1.IterableIterator<Type> |
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
Tuple3()
Initializes a new Tuple3 with null objects. |
|
Tuple3(ObjType0 obj0,
ObjType1 obj1,
ObjType2 obj2)
Initializes a new Tuple3 with the given objects. |
Method Summary | ||
---|---|---|
Tuple3<ObjType0,ObjType1,ObjType2> |
clone()
Makes a copy of this Tuple3. |
|
static
|
collection2(Collection<? extends Tuple3<?,?,InObjType2>> col)
Get a Collection adapter for element 2 of the Tuples of the given Collection. |
|
static
|
create(InObjType0 obj0,
InObjType1 obj1,
InObjType2 obj2)
Creates a new Tuple3 object with the provided objects. |
|
boolean |
equals(Object o)
Indicates whether the given Object is equal to this Tuple3. |
|
Object[] |
get()
Get the objects of this tuple as an array. |
|
Object |
get(int index)
Get the value of this tuple identified by index, which must always be 0, 1 or 2, since this tuple class stores exactly three objects. |
|
ObjType2 |
get2()
Returns the third object of this tuple. |
|
int |
hashCode()
Returns a hash code for this Tuple3, based on the objects it contains. |
|
static
|
iterable2(Iterable<? extends Tuple3<?,?,InObjType2>> iable)
Get an Iterable adapter that returns an Iterator that iterates over element 2 of the Tuples within the given Iterable/Iterator. |
|
void |
set(ObjType0 obj0,
ObjType1 obj1,
ObjType2 obj2)
Sets the values of this Tuple3. |
|
void |
set2(ObjType2 obj)
Sets the third object of this tuple. |
|
int |
size()
Get the size of this tuple, which is always 3. |
Methods inherited from class com.healthmarketscience.common.util.Tuple2 |
---|
collection1, create, create, get1, getKey, getValue, iterable1, set, set1, setValue |
Methods inherited from class com.healthmarketscience.common.util.Tuple1 |
---|
collection0, get0, iterable0, set, set0 |
Methods inherited from class java.util.AbstractList |
---|
add, add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
Methods inherited from class java.util.AbstractCollection |
---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
add, add, addAll, addAll, clear, contains, containsAll, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray |
Constructor Detail |
---|
public Tuple3()
public Tuple3(ObjType0 obj0, ObjType1 obj1, ObjType2 obj2)
create(InObjType0, InObjType1, InObjType2)
instead, since it infers the type parameters based on
its arguments.
obj0
- the first object to store.obj1
- the second object to store.obj2
- the third object to store.Method Detail |
---|
public static <InObjType0,InObjType1,InObjType2> Tuple3<InObjType0,InObjType1,InObjType2> create(InObjType0 obj0, InObjType1 obj1, InObjType2 obj2)
obj0
- the first object to store.obj1
- the second object to store.obj2
- the third object to store.
public static <InObjType2> Iterable<InObjType2> iterable2(Iterable<? extends Tuple3<?,?,InObjType2>> iable)
public static <InObjType2> Collection<InObjType2> collection2(Collection<? extends Tuple3<?,?,InObjType2>> col)
public final ObjType2 get2()
public final void set2(ObjType2 obj)
obj
- the object to set as the third object of this tuple.public Object[] get()
get
in class Tuple2<ObjType0,ObjType1>
public Object get(int index)
get
in interface List<Object>
get
in class Tuple2<ObjType0,ObjType1>
index
- the index of the object to retrieve. Must be 0, 1, or 2.
public final void set(ObjType0 obj0, ObjType1 obj1, ObjType2 obj2)
obj0
- the object to use as the first object of this tuple.obj1
- the object to use as the second object of this tuple.obj2
- the object to use as the third object of this tuple.public int size()
size
in interface Collection<Object>
size
in interface List<Object>
size
in class Tuple2<ObjType0,ObjType1>
public Tuple3<ObjType0,ObjType1,ObjType2> clone()
clone
in class Tuple2<ObjType0,ObjType1>
public boolean equals(Object o)
equals
in interface Collection<Object>
equals
in interface List<Object>
equals
in interface Map.Entry<ObjType0,ObjType1>
equals
in class Tuple2<ObjType0,ObjType1>
true
if the given Object refers to this Tuple3.true
if the given Object is an instance of Tuple3 for which
the contained objects are equal to this Tuple3's objects.false
otherwise.public int hashCode()
hashCode
in interface Collection<Object>
hashCode
in interface List<Object>
hashCode
in interface Map.Entry<ObjType0,ObjType1>
hashCode
in class Tuple2<ObjType0,ObjType1>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |