moj.lang
Class FrequencyList.CompareByTF

java.lang.Object
  extended by moj.lang.FrequencyList.CompareByTF
All Implemented Interfaces:
java.util.Comparator<java.util.Map.Entry<java.lang.String,int[]>>
Enclosing class:
FrequencyList<Entry>

public class FrequencyList.CompareByTF
extends java.lang.Object
implements java.util.Comparator<java.util.Map.Entry<java.lang.String,int[]>>

For ordering words from lowest to highest term frequency. If frequency is equal, words are put in alphabetical order.


Constructor Summary
FrequencyList.CompareByTF()
           
 
Method Summary
 int compare(java.util.Map.Entry<java.lang.String,int[]> obj1, java.util.Map.Entry<java.lang.String,int[]> obj2)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

FrequencyList.CompareByTF

public FrequencyList.CompareByTF()
Method Detail

compare

public int compare(java.util.Map.Entry<java.lang.String,int[]> obj1,
                   java.util.Map.Entry<java.lang.String,int[]> obj2)
Specified by:
compare in interface java.util.Comparator<java.util.Map.Entry<java.lang.String,int[]>>