Package org.snpeff.stats
Class CountByKey<T>
- java.lang.Object
-
- org.snpeff.stats.CountByKey<T>
-
- All Implemented Interfaces:
java.io.Serializable
public class CountByKey<T> extends java.lang.Object implements java.io.SerializableCounters indexed by key. It's a generic version of CountByType- Author:
- pcingola
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CountByKey()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longget(T key)How many counts of this type?voidinc(T key)Increment (by 1)voidinc(T key, int increment)Increment counter for a given typebooleanisEmpty()java.util.Set<T>keySet()longmax()Maximum countlongmin()Minimum countintsize()java.lang.StringtoString()
-
-
-
Method Detail
-
get
public long get(T key)
How many counts of this type?- Parameters:
key-- Returns:
-
inc
public void inc(T key)
Increment (by 1)- Parameters:
key-
-
inc
public void inc(T key, int increment)
Increment counter for a given type- Parameters:
key-
-
isEmpty
public boolean isEmpty()
-
keySet
public java.util.Set<T> keySet()
-
max
public long max()
Maximum count
-
min
public long min()
Minimum count
-
size
public int size()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-