com.maryanovsky.gwtutils.client
Class Triple<T1,T2,T3>

java.lang.Object
  extended by com.maryanovsky.gwtutils.client.Triple<T1,T2,T3>

public final class Triple<T1,T2,T3>
extends Object

A wrapper for any three other given objects.

Author:
Maryanovsky Alexander

Constructor Summary
Triple(T1 first, T2 second, T3 third)
          Creates a new Triple with the three given objects.
 
Method Summary
 boolean equals(Object o)
          Returns true iff the given Object is a Triple, and its objects are the same as this one's (comparison done via Utils.areEqual(Object, Object)).
 T1 getFirst()
          Returns the first object.
 T2 getSecond()
          Returns the second object.
 T3 getThird()
          Returns the third object.
 int hashCode()
          Returns a hashcode combined from the hashcodes of the three target objects.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Triple

public Triple(T1 first,
              T2 second,
              T3 third)
Creates a new Triple with the three given objects. Either of the objects may be null.

Method Detail

getFirst

public T1 getFirst()
Returns the first object.


getSecond

public T2 getSecond()
Returns the second object.


getThird

public T3 getThird()
Returns the third object.


hashCode

public int hashCode()
Returns a hashcode combined from the hashcodes of the three target objects.

Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Returns true iff the given Object is a Triple, and its objects are the same as this one's (comparison done via Utils.areEqual(Object, Object)).

Overrides:
equals in class Object