Class Pair<X,Y>

java.lang.Object
io.keikai.model.util.Pair<X,Y>
Type Parameters:
X - the type of the first element
Y - the type of the second element
All Implemented Interfaces:
Serializable

public class Pair<X,Y> extends Object implements Serializable
A simple immutable pair of two values.

Drop-in replacement for org.zkoss.util.Pair with the same public-field (x, y) and getter (getX(), getY()) API so that both access styles work unchanged.

Since:
7.0.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final X
    The first element (public for compatibility with org.zkoss.util.Pair).
    final Y
    The second element (public for compatibility with org.zkoss.util.Pair).
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    boolean
     
     
     
    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 element (public for compatibility with org.zkoss.util.Pair).
    • y

      public final Y y
      The second element (public for compatibility with org.zkoss.util.Pair).
  • Constructor Details

    • Pair

      public Pair(X x, Y y)
  • Method Details

    • getX

      public X getX()
    • getY

      public Y getY()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object