org.hd.d.pg2k.svrCore
Class Tuple.ComparableTriple<T1 extends java.lang.Comparable<T1>,T2 extends java.lang.Comparable<T2>,T3 extends java.lang.Comparable<T3>>

java.lang.Object
  extended by org.hd.d.pg2k.svrCore.Tuple.ComparableTriple<T1,T2,T3>
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Tuple.ComparableTriple<T1,T2,T3>>
Enclosing class:
Tuple

public static final class Tuple.ComparableTriple<T1 extends java.lang.Comparable<T1>,T2 extends java.lang.Comparable<T2>,T3 extends java.lang.Comparable<T3>>
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<Tuple.ComparableTriple<T1,T2,T3>>

A simple immutable Comparable pair (though the referenced items may be mutable). Either or both fields can be null.

Equality and hash are based on that of the two members.

The natural ordering given by compareTo() is determined by "first", with "second" breaking ties.

See Also:
Serialized Form

Field Summary
 T1 first
          The first member of the triple.
 T2 second
          The second member of the triple.
private static long serialVersionUID
           
 T3 third
          The third member of the triple.
 
Constructor Summary
Tuple.ComparableTriple(T1 first, T2 second, T3 third)
           
 
Method Summary
 int compareTo(Tuple.ComparableTriple<T1,T2,T3> other)
          The ordering is determined by "first", with "second" and then "third" breaking ties.
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 int hashCode()
          Hash is based on that of the members.
 java.lang.String toString()
          Human-readable form.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

first

public final T1 extends java.lang.Comparable<T1> first
The first member of the triple.


second

public final T2 extends java.lang.Comparable<T2> second
The second member of the triple.


third

public final T3 extends java.lang.Comparable<T3> third
The third member of the triple.


serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

Tuple.ComparableTriple

public Tuple.ComparableTriple(T1 first,
                              T2 second,
                              T3 third)
Method Detail

toString

public java.lang.String toString()
Human-readable form.

Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Hash is based on that of the members.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(Tuple.ComparableTriple<T1,T2,T3> other)
The ordering is determined by "first", with "second" and then "third" breaking ties. Instances with nulls may not be comparable.

Specified by:
compareTo in interface java.lang.Comparable<Tuple.ComparableTriple<T1 extends java.lang.Comparable<T1>,T2 extends java.lang.Comparable<T2>,T3 extends java.lang.Comparable<T3>>>

DHD Multimedia Gallery V1.53.0

Copyright (c) 1996-2009, Damon Hart-Davis. All rights reserved.