public static ExtendedCellScanner
    createExtendedCellScanner(final NavigableMap<byte[], List<ExtendedCell>> map) {
    return new ExtendedCellScanner() {
      private final Iterator<Entry<byte[], List<ExtendedCell>>> entries = map.entrySet().iterator();
      private Iterator<ExtendedCell> currentIterator = null;
      private ExtendedCell currentCell;

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

      @Override
      public boolean advance() {
        while (true) {
          if (this.currentIterator == null) {
            if (!this.entries.hasNext()) {
              return false;
            }
            this.currentIterator = this.entries.next().getValue().iterator();
          }
          if (this.currentIterator.hasNext()) {
            this.currentCell = this.currentIterator.next();
            return true;
          }
          this.currentCell = null;
          this.currentIterator = null;
        }
      }
    };
  }
Flatten the map of cells out under the ExtendedCellScanner
@param map Map of Cell Lists; for example, the map of families to ExtendedCells that is used
           inside Put, etc., keeping Cells organized by family.
@return ExtendedCellScanner interface over <code>cellIterable</code>
hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java