|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.javelot.functionalj.tuple.Pair
info.javelot.functionalj.tuple.Triple
info.javelot.functionalj.tuple.Quadruple
Used to create a tuple of four objects. Tuples can be used anywhere
there is a need to group objects together, and Quadruples are used by the
Tuples.zip(Collection, Collection, Collection, Collection) method.
| Field Summary | |
static Function1 |
fourth
Function that returns the fourth element of the tuple. |
static Function4 |
quadruple
Function that creates a Quadruple. |
| Fields inherited from class info.javelot.functionalj.tuple.Triple |
third, triple |
| Fields inherited from class info.javelot.functionalj.tuple.Pair |
first, pair, second |
| Constructor Summary | |
Quadruple(Object p_first,
Object p_second,
Object p_third,
Object p_fourth)
Creates a tuple of the four given objects. |
|
| Method Summary | |
int |
compareTo(Object p_object)
Sort tuples according to the objects that they contain. |
boolean |
equals(Object p_object)
Determines if the given object is equal to this object, by comparing the four objects of each quadruple. |
Object |
getFourth()
Returns the fourth object of the tuple. |
protected List |
getStrings()
Returns a list of the String representations of the objects of the tuple. |
int |
hashCode()
Returns the hash code associated with this object. |
void |
setFourth(Object p_fourth)
Sets the fourth object of the tuple. |
| Methods inherited from class info.javelot.functionalj.tuple.Triple |
getThird, setThird |
| Methods inherited from class info.javelot.functionalj.tuple.Pair |
getFirst, getSecond, setFirst, setSecond, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final Function4 quadruple
public static final Function1 fourth
| Constructor Detail |
public Quadruple(Object p_first,
Object p_second,
Object p_third,
Object p_fourth)
p_fourth - the fourth object of the quadruple. A null value
is accepted. The first three parameters are those accepted by Triple.Triple(Object, Object, Object).Triple.Triple(Object, Object, Object)| Method Detail |
public Object getFourth()
null.public void setFourth(Object p_fourth)
p_fourth - the fourth object of the tuple.public int hashCode()
hashCode in class TriplePair.hashCode()public boolean equals(Object p_object)
equals in class TriplePair.equals(Object)public int compareTo(Object p_object)
PairComparable interface, they
are left unsorted.
compareTo in interface ComparablecompareTo in class Tripleprotected List getStrings()
getStrings in class TriplePair.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||