|
||||||||||
| 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>
| 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
|
pair()
utility method to create pairs with implicit parameterization |
|
static
|
pair(K key,
V val)
utility method to create pairs with implicit parameterization |
|
void |
setFirst(A first)
|
|
void |
setSecond(B second)
|
|
static
|
toHashMap(List<Pair<K,V>> pairs)
|
|
String |
toString()
|
|
| 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 <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 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 | |||||||||