info.javelot.functionalj.tuple
Class Quadruple

java.lang.Object
  extended byinfo.javelot.functionalj.tuple.Pair
      extended byinfo.javelot.functionalj.tuple.Triple
          extended byinfo.javelot.functionalj.tuple.Quadruple
All Implemented Interfaces:
Serializable

public class Quadruple
extends Triple

Used to create a tuple of four objects. Tuples can be used anywhere there is a need to group objects together, and are used by the Tuples.zip(List,List,List,List) method.

Author:
Copyright © 2006 Frederic Daoud
See Also:
Serialized Form

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
 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.
 
Methods inherited from class info.javelot.functionalj.tuple.Triple
getThird
 
Methods inherited from class info.javelot.functionalj.tuple.Pair
getFirst, getSecond, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Quadruple

public Quadruple(Object p_first,
                 Object p_second,
                 Object p_third,
                 Object p_fourth)
Creates a tuple of the four given objects.

Parameters:
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).
See Also:
Triple.Triple(Object,Object,Object)
Method Detail

getFourth

public Object getFourth()
Returns the fourth object of the tuple.

Returns:
the fourth object of the tuple, which may be null.

hashCode

public int hashCode()
Returns the hash code associated with this object.

Overrides:
hashCode in class Triple
Returns:
the hash code associated with this object. See Pair.hashCode() for more details.

equals

public boolean equals(Object p_object)
Determines if the given object is equal to this object, by comparing the four objects of each quadruple. See Pair.equals(Object) for more details.

Overrides:
equals in class Triple

getStrings

protected List getStrings()
Returns a list of the String representations of the objects of the tuple. Here the fourth object of the tuple is added to the list.

Overrides:
getStrings in class Triple
Returns:
a list of the String representations of the objects of the tuple.
See Also:
Pair.toString()