Package elki.utilities.pairs
Class DoubleObjPair<O>
- java.lang.Object
-
- elki.utilities.pairs.DoubleObjPair<O>
-
- Type Parameters:
O
- Object type
- All Implemented Interfaces:
java.lang.Comparable<DoubleObjPair<O>>
public class DoubleObjPair<O> extends java.lang.Object implements java.lang.Comparable<DoubleObjPair<O>>
Pair storing a native double value and an arbitrary object.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description DoubleObjPair(double first, O second)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(DoubleObjPair<O> o)
boolean
equals(java.lang.Object obj)
int
hashCode()
java.lang.String
toString()
Canonical toString operator
-
-
-
Field Detail
-
first
public double first
Double value
-
second
public O second
Second object value
-
-
Constructor Detail
-
DoubleObjPair
public DoubleObjPair(double first, O second)
Constructor.- Parameters:
first
- First valuesecond
- Second value
-
-
Method Detail
-
compareTo
public int compareTo(DoubleObjPair<O> o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<O>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
Canonical toString operator- Overrides:
toString
in classjava.lang.Object
-
-