org.hd.d.pg2k.svrCore
Class Tuple.Pair<T1,T2>

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

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

A simple immutable 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.

See Also:
Serialized Form

Field Summary
 T1 first
          The first member of the pair.
 T2 second
          The second member of the pair.
private static long serialVersionUID
          Unique Serialisation class ID generated by http://random.hd.org/.
 
Constructor Summary
Tuple.Pair(T1 first, T2 second)
           
 
Method Summary
 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 two 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 first
The first member of the pair.


second

public final T2 second
The second member of the pair.


serialVersionUID

private static final long serialVersionUID
Unique Serialisation class ID generated by http://random.hd.org/.

See Also:
Constant Field Values
Constructor Detail

Tuple.Pair

public Tuple.Pair(T1 first,
                  T2 second)
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 two 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. With pairwise elements considered equal if both null or equals() is true.

Overrides:
equals in class java.lang.Object

DHD Multimedia Gallery V1.60.69

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