public static ExtendedCellScanner createExtendedCellScanner(final Iterator<ExtendedCell> cells) {
    if (cells == null) {
      return null;
    }
    return new ExtendedCellScanner() {
      private final Iterator<ExtendedCell> iterator = cells;
      private ExtendedCell current = null;

      @Override
      public ExtendedCell current() {
        return this.current;
      }

      @Override
      public boolean advance() {
        boolean hasNext = this.iterator.hasNext();
        this.current = hasNext ? this.iterator.next() : null;
        return hasNext;
      }
    };
  }
Returns ExtendedCellScanner interface over <code>cellIterable</code> or null if
<code>cells</code> is null
hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java