/** * {@inheritDoc} */ @Override public int removeAll(final CharPredicate predicate) { final int before = this.size(); if (this.allocatedDefaultKey) { if (predicate.apply(('\u0000'))) { this.allocatedDefaultKey = false; } } final char[] keys = ((this.keys)); for (int i = 0; i < keys.length;) { char existing; if (!((existing = keys[i]) == '\u0000') && predicate.apply(existing)) { shiftConflictingKeys(i); // Shift, do not increment slot. } else { i++; } } return before - this.size(); }
/** * {@inheritDoc} */ @Override public int removeAll(final CharIntPredicate predicate) { final int before = this.size(); if (this.allocatedDefaultKey) { if (predicate.apply(('\u0000'), this.allocatedDefaultKeyValue)) { this.allocatedDefaultKey = false; } } final char[] keys = ((this.keys)); final int[] values = ((this.values)); for (int i = 0; i < keys.length;) { char existing; if (!((existing = keys[i]) == '\u0000') && predicate.apply(existing, values[i])) { shiftConflictingKeys(i); // Shift, do not increment slot. } else { i++; } } return before - this.size(); }
if (!((existing = keys[i]) == '\u0000') && other.contains(existing)) { shiftConflictingKeys(i);