java.lang.Object
com.espertech.esper.common.internal.collection.Pair<F,S>
All Implemented Interfaces:
Serializable

public class Pair<F,S> extends Object implements Serializable
General-purpose pair of values of any type. The pair only equals another pair if the objects that form the pair equal, ie. f pair f object equals (.equals) the s pair f object, and the f pair s object equals the s pair s object.
See Also:
  • Field Details

  • Constructor Details

    • Pair

      public Pair(F f, S s)
      Construct pair of values.
      Parameters:
      f - is the f value
      s - is the s value
  • Method Details

    • createPair

      public static <K, V> Pair<K,V> createPair(K key, V value)
    • getFirst

      public F getFirst()
      Returns f value within pair.
      Returns:
      f value within pair
    • getSecond

      public S getSecond()
      Returns s value within pair.
      Returns:
      s value within pair
    • setFirst

      public void setFirst(F f)
      Set the f value of the pair to a new value.
      Parameters:
      f - value to be set
    • setSecond

      public void setSecond(S s)
      Set the s value of the pair to a new value.
      Parameters:
      s - value to be set
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object