Class Pair<F,S>

java.lang.Object
com.ibm.icu.impl.Pair<F,S>
Type Parameters:
F - first object type
S - second object type

public class Pair<F,S> extends Object
A pair of objects: first and second.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final F
     
    final S
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Pair(F first, S second)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
     
    int
     
    static <F, S> Pair<F,S>
    of(F first, S second)
    Creates a pair object

    Methods inherited from class java.lang.Object

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

    • first

      public final F first
    • second

      public final S second
  • Constructor Details

    • Pair

      protected Pair(F first, S second)
  • Method Details

    • of

      public static <F, S> Pair<F,S> of(F first, S second)
      Creates a pair object
      Parameters:
      first - must be non-null
      second - must be non-null
      Returns:
      The pair object.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object