at.tuwien.ifs.somtoolbox.util
Class ElementCounter<T extends Comparable<T>>
java.lang.Object
at.tuwien.ifs.somtoolbox.util.ElementCounter<T>
- Type Parameters:
T
- the type of objects that this object may be compared to
public class ElementCounter<T extends Comparable<T>>
- extends Object
FIXME: this is a copy from valhalla, merge back into IFS-commons!
- Version:
- $Id: ElementCounter.java 3883 2010-11-02 17:13:23Z frank $
- Author:
- Rudolf Mayer
map
private HashMap<T extends Comparable<T>,Integer> map
ElementCounter
public ElementCounter()
incCount
public void incCount(T key)
getCount
public int getCount(T key)
keySet
public Set<T> keySet()
keyList
public ArrayList<T> keyList()
keyList
public ArrayList<T> keyList(int minCount)
entrySet
public Set<Map.Entry<T,Integer>> entrySet()
entrySet
public Set<Map.Entry<T,Integer>> entrySet(int minCount)
values
public Collection<Integer> values()
totalCount
public int totalCount()
size
public int size()
toString
public String toString()
- Overrides:
toString
in class Object
toString
public String toString(int width)
main
public static void main(String[] args)