Class Metrics
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<E>
-
- java.util.HashSet<String>
-
- net.sf.okapi.steps.wordcount.common.Metrics
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<String>,Collection<String>,Set<String>
public class Metrics extends HashSet<String>
Metrics hash-table- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Metrics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetMetric(String name)Get the value of the metric, specified by the given symbolic name.Iterator<String>iterator()booleanregisterMetric(String name)booleanresetMetric(String name)voidresetMetrics()booleansetMetric(String name, long value)StringtoString()booleanunregisterMetric(String name)-
Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, remove, size, spliterator
-
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Method Detail
-
resetMetrics
public void resetMetrics()
-
resetMetric
public boolean resetMetric(String name)
-
getMetric
public long getMetric(String name)
Get the value of the metric, specified by the given symbolic name.- Parameters:
name- symbolic name of the metric- Returns:
- value of the metric specified by the given symbolic name
-
setMetric
public boolean setMetric(String name, long value)
-
registerMetric
public boolean registerMetric(String name)
-
unregisterMetric
public boolean unregisterMetric(String name)
-
toString
public String toString()
- Overrides:
toStringin classAbstractCollection<String>
-
-