Class Pair<X,Y>

java.lang.Object
org.zkoss.util.Pair<X,Y>
All Implemented Interfaces:
Serializable

public class Pair<X,Y> 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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final X
    The first key.
    final Y
    The second key.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
     
    Pair(X x, Y y)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
     
    Returns the first value of the pair.
    Returns the second value of the pair.
    final int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • x

      public final X x
      The first key.
    • y

      public final Y y
      The second key.
  • Constructor Details

    • Pair

      public Pair(X x, Y y)
    • Pair

      protected Pair()
  • Method Details

    • getX

      public X getX()
      Returns the first value of the pair.
    • getY

      public Y 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