Skip to content

Commit

Permalink
Add Counter#set(T,int)
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerS1066 committed Sep 23, 2022
1 parent 9bc3ff4 commit b7176c2
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ public int get(T item) {
return counter.getInt(item);
}

public void set(T item, int count) {
counter.put(item, count);
}

public void add(T item, int count) {
counter.put(item, counter.getInt(item) + count);
}
Expand Down

0 comments on commit b7176c2

Please sign in to comment.