public class HashTable<E> extends DataCounter<E>
Constructor and Description |
---|
HashTable() |
Modifier and Type | Method and Description |
---|---|
int |
getCount(E data)
Returns the current count for the data.
|
SimpleIterator<DataCount<E>> |
getIterator()
Clients must not increment counts between an iterator's creation and its
final use.
|
int |
getSize()
The number of unique data elements in the structure.
|
int |
getTotal()
The number of total words (including duplicates) in the structure.
|
void |
incCount(E data)
Increment the count for a particular data element.
|
toString
public void incCount(E data)
DataCounter
incCount
in class DataCounter<E>
data
- - data element whose count to increment.public int getTotal()
DataCounter
getTotal
in class DataCounter<E>
public int getSize()
DataCounter
getSize
in class DataCounter<E>
public int getCount(E data)
DataCounter
getCount
in class DataCounter<E>
public SimpleIterator<DataCount<E>> getIterator()
DataCounter
getIterator
in class DataCounter<E>