@SuppressWarnings("unchecked") public void remove() { if (last == -1) throw new IllegalStateException(); if (pos < -1) { // We're removing wrapped entries. Object2CharOpenCustomHashMap.this.remove(wrapped.set(-pos - 2, null)); last = -1; return; } size--; if (shiftKeys(last) == pos && c > 0) { c++; nextEntry(); } last = -1; // You can no longer remove this entry. if (ASSERTS) checkTable(); }