public final class IntDoublePair extends Object
Modifier and Type | Field and Description |
---|---|
int |
index
The key.
|
double |
value
The value.
|
Constructor and Description |
---|
IntDoublePair(int index,
double value)
Constructs a tuple out of an int and a double.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
static Comparator<IntDoublePair> |
pairDescendingValueComparator()
Compare pairs by value.
|
static Comparator<IntDoublePair> |
pairIndexComparator()
Compare pairs by index.
|
static Comparator<IntDoublePair> |
pairValueComparator()
Compare pairs by value.
|
String |
toString() |
public IntDoublePair(int index, double value)
index
- The int.value
- The doublepublic static Comparator<IntDoublePair> pairIndexComparator()
public static Comparator<IntDoublePair> pairValueComparator()
public static Comparator<IntDoublePair> pairDescendingValueComparator()
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.