public class Pair<F,S> extends Object implements KeyValuePair<F,S>, Serializable
Modifier and Type | Field and Description |
---|---|
F |
first
The first object.
|
S |
second
The second object.
|
Constructor and Description |
---|
Pair() |
Pair(F first,
S second)
Constructor for holding a pair of objects.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Returns
true if obj is also a Pair and contains two
objects equal to the two objects of this Pair. |
F |
getKey()
Return the first object
|
S |
getValue()
Return the second object
|
int |
hashCode()
Builds a new hash code out of the two objects' hash codes.
|
String |
toString() |
public F getKey()
getKey
in interface KeyValuePair<F,S>
public S getValue()
getValue
in interface KeyValuePair<F,S>
public boolean equals(Object obj)
true
if obj
is also a Pair and contains two
objects equal to the two objects of this Pair. null
references are
considered as equal, too.@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.