|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectus.zuercher.gpx2map.util.Pair<A,B>
public class Pair<A,B>
Pair provides a simple way to associate two objects together.
Field Summary | |
---|---|
A |
first
First item of the pair. |
B |
second
Second item of the pair. |
Constructor Summary | |
---|---|
Pair(A first,
B second)
Constructs a new Pair with the given items. |
Method Summary | |
---|---|
boolean |
equals(Object that)
Compares two Pairs to for equality. |
boolean |
equals(Pair<A,B> that)
Compares two Pairs to for equality. |
boolean |
firstsEqual(Pair<A,B> that)
Tests if both firsts of this and that Pair are equal. |
A |
getFirst()
Returns the first item of the pair. |
B |
getSecond()
Returns the second item of the pair. |
boolean |
secondsEqual(Pair<A,B> that)
Tests if both seconds of this and that Pair are equal. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final A first
public final B second
Constructor Detail |
---|
public Pair(A first, B second)
first
- first item of the pairsecond
- second item of the pairMethod Detail |
---|
public A getFirst()
public B getSecond()
public boolean equals(Object that)
Object.equals(Object)
. The same applies
for the seconds.
equals
in class Object
that
- another Pair
ClassCastException
- if other is not a Pairpublic boolean equals(Pair<A,B> that)
Object.equals(Object)
. The same applies
for the seconds.
that
- another Pair
public boolean firstsEqual(Pair<A,B> that)
Object.equals(Object)
.
that
- another Pair
public boolean secondsEqual(Pair<A,B> that)
Object.equals(Object)
.
that
- another Pair
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |