com.sun.electric.database.geometry.btree.unboxed
Class Pair<A,B>

java.lang.Object
  extended by com.sun.electric.database.geometry.btree.unboxed.Pair<A,B>
All Implemented Interfaces:
java.io.Serializable, java.util.Map.Entry<A,B>

public class Pair<A,B>
extends java.lang.Object
implements java.io.Serializable, java.util.Map.Entry<A,B>

Note that Map.Entry is just the Java idiom for Pair (there is no standard generic Pair). JDK1.6 has AbstractMap.SimpleImmutableEntry for this.

See Also:
Serialized Form

Constructor Summary
Pair(A a, B b)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 A getKey()
           
 B getValue()
           
 int hashCode()
           
 B setValue(B b)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pair

public Pair(A a,
            B b)
Method Detail

setValue

public B setValue(B b)
Specified by:
setValue in interface java.util.Map.Entry<A,B>

getKey

public A getKey()
Specified by:
getKey in interface java.util.Map.Entry<A,B>

getValue

public B getValue()
Specified by:
getValue in interface java.util.Map.Entry<A,B>

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Map.Entry<A,B>
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.Map.Entry<A,B>
Overrides:
equals in class java.lang.Object