373374375376377378379380381382383
{ throw new IllegalArgumentException("Cannot add a negative number of occurrences"); } if (occurrences > 0) { this.items.updateValue(item, 0, new IntToIntFunction() { public int valueOf(int intParameter) { return intParameter + occurrences; }
396397398399400401402403404405406
if (occurrences == 0) { return false; } int newValue = this.items.updateValue(item, 0, new IntToIntFunction() { public int valueOf(int intParameter) { return intParameter - occurrences; }