First - The type of the first (left) component.Second - The type of the second (right) component.public interface Pair<First,Second>
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
equals for Pairs works almost the same as for objects, minus
checking for whether the other object is of the same class. |
First |
getFirst()
Get the first (left) component of this pair.
|
Second |
getSecond()
Get the second (right) component of this pair.
|
First getFirst()
null in general.Second getSecond()
null in
general.boolean equals(Object other)
equals for Pairs works almost the same as for objects, minus
checking for whether the other object is of the same class.
Since all pairs are final and immutable, equals is still an equivalence
relation and all pairs (no matter what exact type) are considered equal.
Pairs behave like that since version 1.1.0 (unfortunately it was not yet
considered in version 1.0.0).Copyright © 2015. All rights reserved.