|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.utilities.pairs.Pair<FIRST,SECOND>
FIRST
- first typeSECOND
- second typepublic class Pair<FIRST,SECOND>
Generic SimplePairCPair
if you want comparable pairs.
Field Summary | |
---|---|
FIRST |
first
First value in pair |
SECOND |
second
Second value in pair |
Constructor Summary | |
---|---|
Pair(FIRST first,
SECOND second)
Initialize pair |
Method Summary | ||
---|---|---|
boolean |
equals(Object obj)
Simple equals statement. |
|
FIRST |
getFirst()
Getter for first |
|
SECOND |
getSecond()
Getter for second element in pair |
|
int |
hashCode()
Canonical hash function, mixing the two hash values. |
|
static
|
newPairArray(int size)
Create a new array of the given size (for generics) |
|
void |
setFirst(FIRST first)
Setter for first |
|
void |
setSecond(SECOND second)
Setter for second |
|
String |
toString()
Canonical toString operator |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public FIRST first
public SECOND second
Constructor Detail |
---|
public Pair(FIRST first, SECOND second)
first
- first parametersecond
- second parameterMethod Detail |
---|
public String toString()
toString
in class Object
public final FIRST getFirst()
getFirst
in interface PairInterface<FIRST,SECOND>
public final void setFirst(FIRST first)
first
- new value for first elementpublic final SECOND getSecond()
getSecond
in interface PairInterface<FIRST,SECOND>
public final void setSecond(SECOND second)
second
- new value for second elementpublic static final <F,S> Pair<F,S>[] newPairArray(int size)
F
- First classS
- Second classsize
- array size
public boolean equals(Object obj)
first
and second
element of
this Pair equal the first
and second
element,
respectively, of the other Pair.
equals
in class Object
obj
- Object to compare topublic final int hashCode()
hashCode
in class Object
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |