gov.sandia.cognition.util
Class DefaultWeightedValue.WeightComparator

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.util.DefaultWeightedValue.WeightComparator
All Implemented Interfaces:
CloneableSerializable, Serializable, Cloneable, Comparator<WeightedValue<?>>
Enclosing class:
DefaultWeightedValue<ValueType>

public static class DefaultWeightedValue.WeightComparator
extends AbstractCloneableSerializable
implements Comparator<WeightedValue<?>>

A comparator for weighted values based on the weight.

See Also:
Serialized Form

Constructor Summary
DefaultWeightedValue.WeightComparator()
          Creates a new WeightComarator.
 
Method Summary
 int compare(WeightedValue<?> first, WeightedValue<?> second)
           
static DefaultWeightedValue.WeightComparator getInstance()
          Gets a static instance of this class.
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

DefaultWeightedValue.WeightComparator

public DefaultWeightedValue.WeightComparator()
Creates a new WeightComarator.

Method Detail

getInstance

public static DefaultWeightedValue.WeightComparator getInstance()
Gets a static instance of this class.

Returns:
A static instance of this class.

compare

public int compare(WeightedValue<?> first,
                   WeightedValue<?> second)
Specified by:
compare in interface Comparator<WeightedValue<?>>