at.tuwien.ifs.somtoolbox.util
Class ElementCounter<T extends Comparable<T>>

java.lang.Object
  extended by 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

Field Summary
private  HashMap<T,Integer> map
           
 
Constructor Summary
ElementCounter()
           
 
Method Summary
 Set<Map.Entry<T,Integer>> entrySet()
           
 Set<Map.Entry<T,Integer>> entrySet(int minCount)
           
 int getCount(T key)
           
 void incCount(T key)
           
 ArrayList<T> keyList()
           
 ArrayList<T> keyList(int minCount)
           
 Set<T> keySet()
           
static void main(String[] args)
           
 int size()
           
 String toString()
           
 String toString(int width)
           
 int totalCount()
           
 Collection<Integer> values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

map

private HashMap<T extends Comparable<T>,Integer> map
Constructor Detail

ElementCounter

public ElementCounter()
Method Detail

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)