|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.molindo.utils.data.Pair<A,B>
public class Pair<A,B>
| Nested Class Summary | |
|---|---|
static class |
Pair.PairCollectionBuilder<K,V>
|
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | ||
|---|---|---|
boolean |
equals(Object obj)
|
|
A |
getFirst()
|
|
A |
getKey()
|
|
B |
getSecond()
|
|
B |
getValue()
|
|
int |
hashCode()
|
|
static
|
keys(Class<T> cls,
PairList<? extends T,?> c)
|
|
static Object[] |
keys(PairList<?,?> c)
|
|
static
|
pair()
utility method to create pairs with implicit parameterization |
|
static
|
pair(K key,
V val)
utility method to create pairs with implicit parameterization |
|
static
|
pairs()
|
|
static
|
pairs(Class<K> kv)
|
|
static
|
pairs(Class<K> k,
Class<V> v)
|
|
static
|
pairs(K k,
V v)
|
|
void |
setFirst(A first)
|
|
void |
setSecond(B second)
|
|
static
|
toHashMap(List<Pair<K,V>> pairs)
|
|
String |
toString()
|
|
static
|
values(Class<T> cls,
PairList<?,? extends T> c)
|
|
static Object[] |
values(PairList<?,?> c)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Pair()
public Pair(A a,
B b)
public Pair(Pair<A,B> p)
public Pair(Map.Entry<A,B> e)
| Method Detail |
|---|
public static <K,V> HashMap<K,V> toHashMap(List<Pair<K,V>> pairs)
public static Object[] keys(PairList<?,?> c)
public static <T> T[] keys(Class<T> cls,
PairList<? extends T,?> c)
public static Object[] values(PairList<?,?> c)
public static <T> T[] values(Class<T> cls,
PairList<?,? extends T> 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 int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic A getFirst()
public void setFirst(A first)
public B getSecond()
public void setSecond(B second)
public B getValue()
public A getKey()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||