Class Pair<F,S>

java.lang.Object
com.yahoo.collections.Pair<F,S>

public class Pair<F,S> extends Object
An immutable pair of objects. This implements equals and hashCode by delegating to the pair objects.
Author:
bratseth
  • Constructor Details

    • Pair

      public Pair(F first, S second)
      Creates a pair. Each member may be set to null.
  • Method Details

    • getFirst

      public F getFirst()
      Returns the first member. This may be null.
    • getSecond

      public S getSecond()
      Returns the second member. This may be null.
    • hashCode

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

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

      public String toString()
      Overrides:
      toString in class Object