edu.rice.cs.plt.tuple
Class Quad<T1,T2,T3,T4>

java.lang.Object
  extended by edu.rice.cs.plt.tuple.Tuple
      extended by edu.rice.cs.plt.tuple.Quad<T1,T2,T3,T4>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
IdentityQuad

public class Quad<T1,T2,T3,T4>
extends Tuple

An arbitrary 4-tuple of objects; overrides toString(), equals(Object), and Tuple.hashCode().

See Also:
Serialized Form

Field Summary
protected  T1 _first
           
protected  T4 _fourth
           
protected  T2 _second
           
protected  T3 _third
           
 
Constructor Summary
Quad(T1 first, T2 second, T3 third, T4 fourth)
           
 
Method Summary
 boolean equals(Object o)
           
static
<T1,T2,T3,T4>
Lambda4<T1,T2,T3,T4,Quad<T1,T2,T3,T4>>
factory()
          Produce a lambda that invokes the constructor
 T1 first()
           
static
<T> Lambda<Quad<? extends T,?,?,?>,T>
firstGetter()
          Produce a lambda that invokes first() on a provided quad.
 T4 fourth()
           
static
<T> Lambda<Quad<?,?,?,? extends T>,T>
fourthGetter()
          Produce a lambda that invokes fourth() on a provided quad.
protected  int generateHashCode()
           
static
<T1,T2,T3,T4>
Quad<T1,T2,T3,T4>
make(T1 first, T2 second, T3 third, T4 fourth)
          Call the constructor (allows the type arguments to be inferred)
 T2 second()
           
static
<T> Lambda<Quad<?,? extends T,?,?>,T>
secondGetter()
          Produce a lambda that invokes second() on a provided quad.
 T3 third()
           
static
<T> Lambda<Quad<?,?,? extends T,?>,T>
thirdGetter()
          Produce a lambda that invokes third() on a provided quad.
 String toString()
           
 
Methods inherited from class edu.rice.cs.plt.tuple.Tuple
hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_first

protected final T1 _first

_second

protected final T2 _second

_third

protected final T3 _third

_fourth

protected final T4 _fourth
Constructor Detail

Quad

public Quad(T1 first,
            T2 second,
            T3 third,
            T4 fourth)
Method Detail

first

public T1 first()

second

public T2 second()

third

public T3 third()

fourth

public T4 fourth()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object
Returns:
true iff this is of the same class as o, and each corresponding element is equal (according to equals)

generateHashCode

protected int generateHashCode()
Specified by:
generateHashCode in class Tuple

make

public static <T1,T2,T3,T4> Quad<T1,T2,T3,T4> make(T1 first,
                                                   T2 second,
                                                   T3 third,
                                                   T4 fourth)
Call the constructor (allows the type arguments to be inferred)


factory

public static <T1,T2,T3,T4> Lambda4<T1,T2,T3,T4,Quad<T1,T2,T3,T4>> factory()
Produce a lambda that invokes the constructor


firstGetter

public static <T> Lambda<Quad<? extends T,?,?,?>,T> firstGetter()
Produce a lambda that invokes first() on a provided quad.


secondGetter

public static <T> Lambda<Quad<?,? extends T,?,?>,T> secondGetter()
Produce a lambda that invokes second() on a provided quad.


thirdGetter

public static <T> Lambda<Quad<?,?,? extends T,?>,T> thirdGetter()
Produce a lambda that invokes third() on a provided quad.


fourthGetter

public static <T> Lambda<Quad<?,?,?,? extends T>,T> fourthGetter()
Produce a lambda that invokes fourth() on a provided quad.