Class Pair<F,S>

java.lang.Object
com.linkedin.venice.utils.Pair<F,S>
Type Parameters:
F - The type of the first item
S - The type of the second item
All Implemented Interfaces:
Serializable

@Deprecated public class Pair<F,S> extends Object implements Serializable
Deprecated.
Instead of this, please create a dedicated class with well-named, non-generic (potentially primitive) properties and getters.
Represents a pair of items
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Pair(F first, S second)
    Deprecated.
    Use the static factory method create(Object, Object) instead of this where possible.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <F, S> int
    calculateHashCode(F first, S second)
    Deprecated.
     
    static final <F, S> Pair<F,S>
    create(F first, S second)
    Deprecated.
    Static factory method that, unlike the constructor, performs generic inference saving some typing.
    final boolean
    Deprecated.
     
    final F
    Deprecated.
     
    final S
    Deprecated.
     
    final int
    Deprecated.
     
    final String
    Deprecated.
     

    Methods inherited from class java.lang.Object

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

    • Pair

      public Pair(F first, S second)
      Deprecated.
      Use the static factory method create(Object, Object) instead of this where possible.
      Parameters:
      first -
      second -
  • Method Details

    • create

      public static final <F, S> Pair<F,S> create(F first, S second)
      Deprecated.
      Static factory method that, unlike the constructor, performs generic inference saving some typing. Use in the following way (for a pair of Strings):

      Pair<String, String> pair = Pair.create("first", "second");

      Type Parameters:
      F - The type of the first thing.
      S - The type of the second thing
      Parameters:
      first - The first thing
      second - The second thing
      Returns:
      The pair (first,second)
    • getFirst

      public final F getFirst()
      Deprecated.
    • getSecond

      public final S getSecond()
      Deprecated.
    • hashCode

      public final int hashCode()
      Deprecated.
      Overrides:
      hashCode in class Object
    • calculateHashCode

      public static <F, S> int calculateHashCode(F first, S second)
      Deprecated.
    • equals

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

      public final String toString()
      Deprecated.
      Overrides:
      toString in class Object