Package com.linkedin.venice.utils
Class Pair<F,S>
- java.lang.Object
-
- com.linkedin.venice.utils.Pair<F,S>
-
- Type Parameters:
F
- The type of the first itemS
- The type of the second item
- All Implemented Interfaces:
java.io.Serializable
@Deprecated public class Pair<F,S> extends java.lang.Object implements java.io.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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Pair(F first, S second)
Deprecated.Use the static factory methodcreate(Object, Object)
instead of this where possible.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <F,S>
intcalculateHashCode(F first, S second)
Deprecated.static <F,S>
Pair<F,S>create(F first, S second)
Deprecated.Static factory method that, unlike the constructor, performs generic inference saving some typing.boolean
equals(java.lang.Object obj)
Deprecated.F
getFirst()
Deprecated.S
getSecond()
Deprecated.int
hashCode()
Deprecated.java.lang.String
toString()
Deprecated.
-
-
-
Constructor Detail
-
Pair
public Pair(F first, S second)
Deprecated.Use the static factory methodcreate(Object, Object)
instead of this where possible.- Parameters:
first
-second
-
-
-
Method Detail
-
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
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 thingsecond
- 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 classjava.lang.Object
-
calculateHashCode
public static <F,S> int calculateHashCode(F first, S second)
Deprecated.
-
equals
public final boolean equals(java.lang.Object obj)
Deprecated.- Overrides:
equals
in classjava.lang.Object
-
toString
public final java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-