@Override
    public boolean hasNext() {
      if (iterator.hasNext()) {
        IndexMap.IndexEntry indexEntry = iterator.next();
        nextEntry.setIndexEntry(indexEntry);
        needToCallHasNext = false;
        if (keysToRemove != null) {
          Iterator keysToRemoveIterator = keysToRemove.iterator();
          while (keysToRemoveIterator.hasNext()) {
            try {
              if (TypeUtils.compare(nextEntry.getDeserializedValue(), keysToRemoveIterator.next(),
                  OQLLexerTokenTypes.TOK_EQ).equals(Boolean.TRUE)) {
                return hasNext();
              }
            } catch (TypeMismatchException e) {
              // they are not equals, so we just continue iterating
            }
          }
        }
        return true;
      }
      return false;
    }
Wraps a CloseableIterator<IndexMap.IndexEntry> and returns a IndexStorageEntry when iterating
over
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/MapIndexStore.java