|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.util.lang.Pair<F,S>
F
- type of the first elementS
- type of the second element@ThreadSafe public final class Pair<F,S>
Immutable, generic pair of values. How coool is that!
Method Summary | ||
---|---|---|
boolean |
equals(Object o)
|
|
F |
first()
|
|
int |
hashCode()
|
|
static
|
nicePairOf(U first,
V second)
A pair that does allows null values. |
|
static
|
of(U first,
V second)
By default we create a strict pair of non-null values. |
|
S |
second()
|
|
static
|
strictPairOf(U first,
V second)
A pair that doesn't allow null values. |
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static <U,V> Pair<U,V> of(U first, V second)
U
- type of first valueV
- type of second valuefirst
- first valuesecond
- second value
strictPairOf(Object, Object)
public static <U,V> Pair<U,V> strictPairOf(U first, 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(U first, 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()
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |