Class FrequencyMap<T>
Object
FrequencyMap<T>
- Type Parameters:
T
- key-type (should haveObject.toString()
representation that is meaningful to humans)
Counts the frequency of certain strings, and describes the contents in human language.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDescribes the frequency map contents in human-readable language.void
incrementCount
(T key) Increments the count for a given key.
-
Constructor Details
-
FrequencyMap
public FrequencyMap()
-
-
Method Details
-
incrementCount
Increments the count for a given key.- Parameters:
key
- the key whose count should be incremented
-
describe
Describes the frequency map contents in human-readable language.- Parameters:
noun
- the noun to use in the description (e.g., "color", "shape")- Returns:
- a
String
describing the contents of the frequency map
-