public class CountMap<T> extends Object
| Constructor and Description | 
|---|
| CountMap()Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| int | addItem(T item)Counts an item. | 
| void | clear()Sets all the item counts to zero. | 
| int | getCount(T key)Returns the number of times a given item has been added. | 
| Set<T> | keySet()Returns a set of all the items with a count of at least one. | 
public int addItem(T item)
item - item to countpublic int getCount(T key)
key - item to countpublic Set<T> keySet()
public void clear()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.