| Modifier and Type | Interface and Description |
|---|---|
interface |
ComparablePair<First extends Comparable<? super First>,Second extends Comparable<? super Second>>
A
Pair which is Comparable. |
interface |
ComparableSerializablePair<First extends Serializable & Comparable<? super First>,Second extends Serializable & Comparable<? super Second>>
|
interface |
SerializablePair<First extends Serializable,Second extends Serializable>
A
Pair which is Serializable. |
| Modifier and Type | Method and Description |
|---|---|
static <First,Second> |
Pairs.from(First first,
Second second)
Create a simple pair from it's first and second component.
|
| Modifier and Type | Method and Description |
|---|---|
static <First extends Comparable<? super First>,Second extends Comparable<? super Second>> |
Pairs.compare(Pair<First,Second> left,
Pair<First,Second> right)
compare(a, b) lexicographically compares the pair
a with the pair b. |
static <First extends Comparable<? super First>,Second extends Comparable<? super Second>> |
Pairs.compare(Pair<First,Second> left,
Pair<First,Second> right)
compare(a, b) lexicographically compares the pair
a with the pair b. |
static <F,S> boolean |
Pairs.equals(Pair<F,S> left,
Object right)
Compares two pairs for equality.
|
static <F,S> int |
Pairs.hashCode(Pair<F,S> pair)
Computes the hash code of a pair.
|
static <CommonSuperType,First extends CommonSuperType,Second extends CommonSuperType> |
Pairs.toArray(Pair<First,Second> pair,
Class<CommonSuperType> commonSuperType)
Transform a pair into an array of the common super type of both components.
|
static <CommonSuperType,First extends CommonSuperType,Second extends CommonSuperType> |
Pairs.toArray(Pair<First,Second> pair,
CommonSuperType[] target,
int offset)
Write a pair into an array of the common super type of both components.
|
| Modifier and Type | Method and Description |
|---|---|
static <K,V,M extends Map<K,V>> |
Pairs.toMap(Iterable<Pair<K,V>> pairs,
Class<M> mapType)
|
static <K,V,M extends Map<K,V>> |
Pairs.toMap(Iterable<Pair<K,V>> pairs,
M map)
Adds the pairs from the
Iterable of pairs (k, v) to
the given map. |
Copyright © 2015. All rights reserved.