public class Pair<A,B> extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Pair.PairCollectionBuilder<K,V> |
| Constructor and Description |
|---|
Pair()
Contructs a pair holding two null values.
|
Pair(A a,
B b)
Contructs a pair holding the given objects.
|
Pair(Map.Entry<A,B> e) |
Pair(Pair<A,B> p)
Contructs a pair holding the objects of the given pair.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
A |
getFirst() |
A |
getKey() |
B |
getSecond() |
B |
getValue() |
int |
hashCode() |
static <T> T[] |
keys(Class<T> cls,
PairList<? extends T,?> c) |
static Object[] |
keys(PairList<?,?> c) |
static <K,V> Pair<K,V> |
pair()
utility method to create pairs with implicit parameterization
|
static <K,V> Pair<K,V> |
pair(K key,
V val)
utility method to create pairs with implicit parameterization
|
static <K,V> Pair.PairCollectionBuilder<K,V> |
pairs() |
static <K> Pair.PairCollectionBuilder<K,K> |
pairs(Class<K> kv) |
static <K,V> Pair.PairCollectionBuilder<K,V> |
pairs(Class<K> k,
Class<V> v) |
static <K,V> Pair.PairCollectionBuilder<K,V> |
pairs(K k,
V v) |
void |
setFirst(A first) |
void |
setSecond(B second) |
static <K,V> HashMap<K,V> |
toHashMap(List<Pair<K,V>> pairs) |
String |
toString() |
static <T> T[] |
values(Class<T> cls,
PairList<?,? extends T> c) |
static Object[] |
values(PairList<?,?> c) |
public static <K,V> Pair<K,V> pair(K key, V val)
K - V - key - val - public static <K,V> Pair<K,V> pair()
K - V - public static <K> Pair.PairCollectionBuilder<K,K> pairs(Class<K> kv)
public static <K,V> Pair.PairCollectionBuilder<K,V> pairs(K k, V v)
public static <K,V> Pair.PairCollectionBuilder<K,V> pairs(Class<K> k, Class<V> v)
public static <K,V> Pair.PairCollectionBuilder<K,V> pairs()
public A getFirst()
public void setFirst(A first)
public B getSecond()
public void setSecond(B second)
public B getValue()
public A getKey()
Copyright © 2014 Molindo GmbH. All Rights Reserved.