org.zkoss.util
Class Pair

java.lang.Object
  extended by org.zkoss.util.Pair
All Implemented Interfaces:
java.io.Serializable

public class Pair
extends java.lang.Object
implements java.io.Serializable

A pair of keys. It is used with DualHashSet and DualHashMap to represent a pair of keys as an object.

Author:
tomyeh
See Also:
Serialized Form

Field Summary
 java.lang.Object x
          The first key.
 java.lang.Object y
          The second key.
 
Constructor Summary
protected Pair()
           
  Pair(java.lang.Object x, java.lang.Object y)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.Object getX()
          Returns the first value of the pair.
 java.lang.Object getY()
          Returns the second value of the pair.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public final java.lang.Object x
The first key.


y

public final java.lang.Object y
The second key.

Constructor Detail

Pair

public Pair(java.lang.Object x,
            java.lang.Object y)

Pair

protected Pair()
Method Detail

getX

public java.lang.Object getX()
Returns the first value of the pair.


getY

public java.lang.Object getY()
Returns the second value of the pair.


equals

public final boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo