|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mulgara.util.Pair<A,B>
public class Pair<A,B>
A pair of values representing a first/second pair
| Field Summary | |
|---|---|
A |
_1
The first. |
B |
_2
The second. |
| Constructor Summary | |
|---|---|
Pair(A a,
B b)
Create a new first/value pair. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
Equality method. |
A |
getFirst()
Gets the first |
A |
getKey()
Synonym for getFirst |
B |
getSecond()
Synonym for getValue |
B |
getValue()
Gets the value |
int |
hashCode()
The hashcode, based on the first and second. |
B |
setValue(B b)
Setting the value is not supported. |
String |
toString()
Represents this node as a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final A _1
public final B _2
| Constructor Detail |
|---|
public Pair(A a,
B b)
a - The first part of the pair.b - The second part of the pair.| Method Detail |
|---|
public A getFirst()
public A getKey()
getKey in interface Map.Entry<A,B>public B getValue()
getValue in interface Map.Entry<A,B>public B getSecond()
public B setValue(B b)
setValue in interface Map.Entry<A,B>public boolean equals(Object o)
equals in interface Map.Entry<A,B>equals in class Objectpublic int hashCode()
hashCode in interface Map.Entry<A,B>hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||