@Override
    public T next() {
      if (!components.isEmpty()) {
        this.nextWasCalled = true;
        List<T> src = components.get(currentComponent);
        if (++indexWithinComponent < src.size()) {
          return src.get(indexWithinComponent);
        }

        if (++currentComponent < components.size()) {
          indexWithinComponent = 0;
          src = components.get(currentComponent);
          assert src.size() > 0;
          return src.get(indexWithinComponent);
        }
      }
      this.nextWasCalled = false;
      throw new NoSuchElementException();
    }
A collection class that contains multiple sub-lists, which allows us to not copy lists. This
class does not support modification. The derived classes that add modifications are not
thread-safe. NOTE: Doesn't implement list as it is not necessary for current usage, feel free to
add.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ConcatenatedLists.java