F
- type of the first elementS
- type of the second element@ThreadSafe public final class Pair<F,S> extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
F |
first() |
int |
hashCode() |
static <U,V> Pair<U,V> |
nicePairOf(U first,
V second)
A pair that does allows
null values. |
static <U,V> Pair<U,V> |
of(U first,
V second)
By default we create a strict pair of non-null values.
|
S |
second() |
static <U,V> Pair<U,V> |
strictPairOf(U first,
V second)
A pair that doesn't allow
null values. |
String |
toString() |
public static <U,V> Pair<U,V> of(U first, V second)
U
- type of first valueV
- type of second valuefirst
- first valuesecond
- second valuestrictPairOf(Object, Object)
public static <U,V> Pair<U,V> strictPairOf(@Nonnull U first, @Nonnull V second)
null
values.U
- type of first valueV
- type of second valuefirst
- first value, may not be null
second
- second value, may not be null
public static <U,V> Pair<U,V> nicePairOf(@Nullable U first, @Nullable V second)
null
values.U
- type of first valueV
- type of second valuefirst
- first value, may be null
second
- second value, may be null
public F first()
public S second()
Copyright © 2002-2016 Atlassian. All Rights Reserved.