gov.llnl.ontology.util
Class Counter.EntryComparator

java.lang.Object
  extended by gov.llnl.ontology.util.Counter.EntryComparator
All Implemented Interfaces:
Comparator<Map.Entry<T,Integer>>
Enclosing class:
Counter<T>

public class Counter.EntryComparator
extends Object
implements Comparator<Map.Entry<T,Integer>>

Compares the integer value of two Map#Entry object based on ascending or descending order.


Constructor Summary
Counter.EntryComparator(boolean sortAscending)
          Constructs a new Counter.EntryComparator.
 
Method Summary
 int compare(Map.Entry<T,Integer> e1, Map.Entry<T,Integer> e2)
          
 boolean equals(Object obj)
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Counter.EntryComparator

public Counter.EntryComparator(boolean sortAscending)
Constructs a new Counter.EntryComparator.

Method Detail

compare

public int compare(Map.Entry<T,Integer> e1,
                   Map.Entry<T,Integer> e2)

Specified by:
compare in interface Comparator<Map.Entry<T,Integer>>

equals

public boolean equals(Object obj)

Specified by:
equals in interface Comparator<Map.Entry<T,Integer>>
Overrides:
equals in class Object


Copyright © 2010-2011. All Rights Reserved.