/**
   * @param entry Entry.
   * @param bound Value bound.
   * @throws Exception If failed.
   */
  private void checkEntry(GridCacheEntry<String, Integer> entry, int bound) throws Exception {
    assert entry != null;

    checkKey(entry.getKey());
    checkValue(entry.getValue(), bound);
    checkValue(entry.get(), bound);
  }
    /** {@inheritDoc} */
    @Override
    public void remove() {
      if (currEntry == null) throw new IllegalStateException();

      assert currIter != null;

      currIter.remove();

      try {
        GridNearCache.this.remove(currEntry.getKey(), CU.<K, V>empty());
      } catch (GridException e) {
        throw new GridRuntimeException(e);
      }
    }