Known-Items Task Evaluation

Class RankComparator

java.lang.Object
  |
  +--RankComparator
All Implemented Interfaces:
java.util.Comparator

public class RankComparator
extends java.lang.Object
implements java.util.Comparator

A class that implements the java.util.Comparator interface to compare Items based on rank


Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares its two arguments for ordering them on rank.
static RankComparator getInstance()
          Returns the unique instance of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Method Detail

getInstance

public static RankComparator getInstance()
Returns the unique instance of this class.

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
            throws java.lang.ClassCastException
Compares its two arguments for ordering them on rank.
Specified by:
compare in interface java.util.Comparator
Returns:
a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
Throws:
java.lang.ClassCastException - Thrown if one of the arguments is not a transition instance.

Known-Items Task Evaluation

For information over@nist.gov or rtaban@nist.gov