org.zkoss.util
Class Pair

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

public class Pair
extends Object
implements 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
 Object x
          The first key.
 Object y
          The second key.
 
Constructor Summary
protected Pair()
           
  Pair(Object x, Object y)
           
 
Method Summary
 boolean equals(Object o)
           
 Object getX()
          Returns the first value of the pair.
 Object getY()
          Returns the second value of the pair.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public final Object x
The first key.


y

public final Object y
The second key.

Constructor Detail

Pair

public Pair(Object x,
            Object y)

Pair

protected Pair()
Method Detail

getX

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


getY

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


equals

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

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.