net.sourceforge.nite.util
Class WeightedPair
java.lang.Object
net.sourceforge.nite.util.Pair
net.sourceforge.nite.util.WeightedPair
- All Implemented Interfaces:
- java.lang.Comparable
public class WeightedPair
- extends Pair
- implements java.lang.Comparable
A simple data class to hold a weighted pair of objects (o1,o1,w).
Used in the datainspection packages
Compare rules:
pair1 > null
pair1 == pair1
otherwise, ordering is on w
Fields inherited from class net.sourceforge.nite.util.Pair |
o1, o2 |
Constructor Summary |
WeightedPair(java.lang.Object a,
java.lang.Object b,
double weight)
|
Method Summary |
int |
compareTo(java.lang.Object o)
|
Methods inherited from class net.sourceforge.nite.util.Pair |
equals |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
w
public double w
WeightedPair
public WeightedPair(java.lang.Object a,
java.lang.Object b,
double weight)
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareTo
in interface java.lang.Comparable