| java.lang.Object com.tc.management.stats.TopN
TopN | final public class TopN (Code) | | Keeps track of the top N entries of all those sumbitted according to their natural order, or as
defined by the passed in
Comparator if the second constructor is used. The comparator should order
the elements from lowest to highest, otherwise you will wind up
|
Constructor Summary | |
public | TopN(int N) Creates a top
TopN.N list according to a natural ordering, if you have a custom object you will be adding use
TopN.TopN(Comparator,int) instead. | public | TopN(Comparator comparator, int N) Creates a top
N list according to
comparator . |
TopN | public TopN(Comparator comparator, int N)(Code) | | Creates a top
N list according to
comparator .
|
evaluate | public boolean evaluate(Object object)(Code) | | Parameters: object - the object added to the top N list in order, if it qualifies according to the comparator |
iterator | public Iterator iterator()(Code) | | a read-only Iterator of the "top" TopN.N elements, in descending order -- that is, the"biggest" one is first. |
|
|