incrementFrequency method
Returns a DftMapEntry with the key set to term
.
If the term
key exists in the DftMap, it's mapped value is
incremented by 1.
If the term
key does not exist in the DftMap, an entry is created
and its value set to 1.
Implementation
DftMapEntry incrementFrequency(String term) =>
setFrequency(term, getFrequency(term) + 1);