public final class Pair extends Object
Modifier and Type | Field and Description |
---|---|
private String |
first
First value of this pair.
|
private int |
hash
Cache hash code for this immutable instance.
|
private String |
second
The second value of this pair.
|
Constructor and Description |
---|
Pair(String first,
String second)
Construct a pair instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Equality test operator.
|
String |
first()
Get first value of this pair.
|
int |
hashCode()
Get instance hash code.
|
String |
key()
Semantic alias for
first() , when pair is used in a map context. |
String |
second()
Get the second value of this pair.
|
String |
toString() |
String |
value()
Semantic alias for
second() , when pair is used in a map context. |
private final String first
private final String second
private int hash
public String first()
public String second()
public String key()
first()
, when pair is used in a map context.public String value()
second()
, when pair is used in a map context.Copyright © 2020. All rights reserved.