public class Classifier<T>
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
Classifier.CountedValue<T> |
Aggregates a value and the number of times it has been submitted.
|
Constructor | Description |
---|---|
Classifier() |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
long |
getItemCount() |
Returns the number of values submitted so far.
|
java.util.Collection<Classifier.CountedValue<T>> |
getThresholdValues(int minCount) |
Returns a sorted list of the values with a certain minimum count.
|
java.util.SortedSet<Classifier.CountedValue<T>> |
getTopValues(int nValue) |
Returns a sorted list of the N most popular values.
|
long |
getValueCount() |
Returns the number of distinct values seen so far.
|
void |
submit(T value) |
Submits a value for categorisation.
|
public void submit(T value)
value
- valuepublic long getItemCount()
public long getValueCount()
public java.util.SortedSet<Classifier.CountedValue<T>> getTopValues(int nValue)
nValue
- maximum number of values to returnpublic java.util.Collection<Classifier.CountedValue<T>> getThresholdValues(int minCount)
minCount
- minimum number of submissions for each returned valueCopyright ? 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.