@Override
  public ExtendedCell next() {
    ExtendedCell oldCurrent = current;
    if (iter.hasNext()) {
      current = iter.next();
    } else {
      current = null;
    }
    return oldCurrent;
  }
Utility scanner that wraps a sortable collection and serves as a KeyValueScanner.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/CollectionBackedScanner.java