de.lmu.ifi.dbs.elki.utilities.pairs
Class DoubleObjPair<O>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.pairs.DoubleObjPair<O>
Type Parameters:
O - Object type
All Implemented Interfaces:
PairInterface<Double,O>, Comparable<DoubleObjPair<O>>

public class DoubleObjPair<O>
extends Object
implements PairInterface<Double,O>, Comparable<DoubleObjPair<O>>

Pair storing a native double value and an arbitrary object.


Field Summary
 double first
          Double value
 O second
          Second object value
 
Constructor Summary
DoubleObjPair(double first, O second)
          Constructor.
 
Method Summary
 int compareTo(DoubleObjPair<O> o)
           
 boolean equals(Object obj)
           
 Double getFirst()
          Deprecated. use pair.first to avoid boxing!
 O getSecond()
          Get the second object - note: this may cause autoboxing, use pair.second for native pairs!
 String toString()
          Canonical toString operator
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 value
second - Second value
Method Detail

getFirst

@Deprecated
public Double getFirst()
Deprecated. use pair.first to avoid boxing!

Description copied from interface: PairInterface
Get the first object - note: this may cause autoboxing, use pair.first for native pairs!

Specified by:
getFirst in interface PairInterface<Double,O>
Returns:
First object

getSecond

public O getSecond()
Description copied from interface: PairInterface
Get the second object - note: this may cause autoboxing, use pair.second for native pairs!

Specified by:
getSecond in interface PairInterface<Double,O>
Returns:
Second object

compareTo

public int compareTo(DoubleObjPair<O> o)
Specified by:
compareTo in interface Comparable<DoubleObjPair<O>>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Canonical toString operator

Overrides:
toString in class Object

Release 0.4.0 (2011-09-20_1324)