|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.springsource.util.math.OrderedPair<F,S>
F - type of first elementS - type of second elementpublic final class OrderedPair<F,S>
Defines an ordered pair of elements of types F and S respectively.
( new OrderedPair(42,null) )
.equals( new OrderedPair(42,null) )
returns true.
Concurrent Semanticsfinal but that doesn't stop
them being modified after the pair is constructed. The hashCode() of the OrderedPair may then change.
| Field Summary | |
|---|---|
private F |
first
|
private S |
second
|
| Constructor Summary | |
|---|---|
OrderedPair(F first,
S second)
Creates a new OrderedPair. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
F |
getFirst()
Gets the first member of the OrderedPair. |
S |
getSecond()
Gets the second member of the OrderedPair. |
int |
hashCode()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final F first
private final S second
| Constructor Detail |
|---|
public OrderedPair(F first,
S second)
OrderedPair.
first - the first member of the OrderedPair.second - the second member of the OrderedPair.| Method Detail |
|---|
public F getFirst()
OrderedPair.
OrderedPair.public S getSecond()
OrderedPair.
OrderedPair.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||