net.sourceforge.nite.util
Class WeightedPair

java.lang.Object
  extended by net.sourceforge.nite.util.Pair
      extended by 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


Field Summary
 double 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
 

Field Detail

w

public double w
Constructor Detail

WeightedPair

public WeightedPair(java.lang.Object a,
                    java.lang.Object b,
                    double weight)
Method Detail

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable