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:
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
ConstructorDescriptionDeprecated.Use the static factory methodcreate(Object, Object)
instead of this where possible. -
Method Summary
Modifier and TypeMethodDescriptionstatic <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
getFirst()
Deprecated.final S
Deprecated.final int
hashCode()
Deprecated.final String
toString()
Deprecated.
-
Constructor Details
-
Pair
Deprecated.Use the static factory methodcreate(Object, Object)
instead of this where possible.- Parameters:
first
-second
-
-
-
Method Details
-
create
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 thingsecond
- The second thing- Returns:
- The pair (first,second)
-
getFirst
Deprecated. -
getSecond
Deprecated. -
hashCode
public final int hashCode()Deprecated. -
calculateHashCode
public static <F,S> int calculateHashCode(F first, S second) Deprecated. -
equals
Deprecated. -
toString
Deprecated.
-