public boolean removeFromKeysToRemove(Collection keysToRemove, Object key) {
      Iterator iterator = keysToRemove.iterator();
      while (iterator.hasNext()) {
        try {
          if (TypeUtils.compare(key, iterator.next(), OQLLexerTokenTypes.TOK_EQ)
              .equals(Boolean.TRUE)) {
            iterator.remove();
            return true;
          }
        } catch (TypeMismatchException e) {
          // they are not equals, so we just continue iterating
        }
      }
      return false;
    }
returns a new InMemoryIndexStorageEntry with current index key and its next value which is
the next RE in the collection. Make sure hasNext() has been called before calling this method
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/MemoryIndexStore.java