@Override
    public Object next() {
      try {
        currentEntry = elements[current++];
      } catch (IndexOutOfBoundsException e) {
        // We should not be coming here as element-data and
        // size are updated atomically.
        throw new NoSuchElementException();
        // return null;
      }
      return currentEntry;
    }
Returns next element. But does not increment the cursor. Always use hasNext() before this
method call
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexElemArray.java