|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.utilities.pairs.IntDoublePair
public class IntDoublePair
Pair storing an integer and a double.
Since double and int are native types, this can't be done via the CPair
generic.
Field Summary | |
---|---|
int |
first
first value |
double |
second
second value |
Constructor Summary | |
---|---|
IntDoublePair(int first,
double second)
Constructor |
Method Summary | |
---|---|
int |
compareSwappedTo(IntDoublePair other)
Implementation of comparableSwapped interface, sorting by second then first. |
int |
compareTo(IntDoublePair other)
Implementation of comparable interface, sorting by first then second. |
boolean |
equals(Object obj)
Trivial equals implementation |
int |
getFirst()
Get first value |
double |
getSecond()
Get second value |
int |
hashCode()
Trivial hashCode implementation mixing the two integers. |
void |
setFirst(int first)
Set first value |
void |
setSecond(double second)
Set second value |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int first
public double second
Constructor Detail |
---|
public IntDoublePair(int first, double second)
first
- second
- Method Detail |
---|
public boolean equals(Object obj)
equals
in class Object
obj
- Object to compare topublic final int hashCode()
hashCode
in class Object
public int compareTo(IntDoublePair other)
compareTo
in interface Comparable<IntDoublePair>
other
- Object to compare to
public int compareSwappedTo(IntDoublePair other)
other
- Object to compare to
public final int getFirst()
public final void setFirst(int first)
first
- new valuepublic final double getSecond()
public final void setSecond(double second)
second
- new value
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |