Example #1
0
 public void remove() {
   if (currentIndex == INDEX_ZERO && map.hasZeroValue) {
     map.hasZeroValue = false;
   } else if (currentIndex < 0) {
     throw new IllegalStateException("next must be called before remove.");
   } else if (currentIndex >= map.capacity) {
     map.removeStashIndex(currentIndex);
     nextIndex = currentIndex - 1;
     findNextIndex();
   } else {
     map.keyTable[currentIndex] = EMPTY;
   }
   currentIndex = INDEX_ILLEGAL;
   map.size--;
 }