private static class NaturalRanking.IntDoublePair extends java.lang.Object implements java.lang.Comparable<NaturalRanking.IntDoublePair>
Modifier and Type | Field and Description |
---|---|
private int |
position
Original position of the pair
|
private double |
value
Value of the pair
|
Constructor and Description |
---|
IntDoublePair(double value,
int position)
Construct an IntDoublePair with the given value and position.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(NaturalRanking.IntDoublePair other)
Compare this IntDoublePair to another pair.
|
int |
getPosition()
Returns the original position of the pair.
|
double |
getValue()
Returns the value of the pair.
|
private final double value
private final int position
public IntDoublePair(double value, int position)
value
- the value of the pairposition
- the original positionpublic int compareTo(NaturalRanking.IntDoublePair other)
compareTo
in interface java.lang.Comparable<NaturalRanking.IntDoublePair>
other
- the other pair to compare this toDouble.compare(value, other.value)
public double getValue()
public int getPosition()