Skips the iterator ahead to the items read value stored in the execution context

@param it any iterator
353002
protected void skipLinesAlreadyRead(Iterator it) {
        long linesRead = getItemsRead();
        if (linesRead > 0) {
            for (long i = 0; i < linesRead; i++) {
                if (it.hasNext()) {
                    it.next();
                }
            }
        }
    }
533796
def skip_first(pipe, items=1):
    ''' 
    '''
    pipe = iter(pipe)
    for i in skip(pipe, items):
        yield i
36558
public static void skip(InputStream is) throws IOException {
        while (is.available() > 0) {
            is.skip(Long.MAX_VALUE);
        }
        is.close();
    }
117244
void skipLine() {
        int ch;
        do {
            try {
                ch = reader.read();
            } catch( IOException ex ) {
                throw new LessException( ex );
            }
            incLineColumn( ch );
        } while( ch != '\n' && ch != -1 );
    }
97400
public synchronized void skipTo(final long newValue) throws IllegalStateException {
    if (newValue < currentValue) {
      throw new IllegalStateException(
          "Cannot skip to less than the current value (="
          + currentValue + "), where newValue=" + newValue);
    }
    currentValue = newValue;
  }
712050
private void clean() {
        Iterator<Entry<K, WeakReference<V>>> iter = entrySet().iterator();
        while (iter.hasNext()) {
            Entry<K, WeakReference<V>> e = iter.next();
            if (e != null && e.getValue() != null
                && e.getValue().get() == null) {
                iter.remove();
            }
        }
    }
98422
public final void removeAll() {
        Iterator<T> it = iterator();
        while (it.hasNext()) {
            it.next();
            it.remove();
        }
    }
236643
function iterate(iterator, callback) {
        var self = this;

        var promise = new Promise(function(resolve, reject) {
            self.ready().then(function() {
                var dbInfo = self._dbInfo;
                var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly')
                                     .objectStore(dbInfo.storeName);

                var req = store.openCursor();

                req.onsuccess = function() {
                    var cursor = req.result;

                    if (cursor) {
                        var result = iterator(cursor.value, cursor.key);

                        if (result !== void(0)) {
                            resolve(result);
                        } else {
                            cursor["continue"]();
                        }
                    } else {
                        resolve();
                    }
                };

                req.onerror = function() {
                    reject(req.error);
                };
            })["catch"](reject);
        });

        executeDeferedCallback(promise, callback);

        return promise;
    }
1343967
@Override
  public long skip(long ln) throws IOException {
    try {
      return in.skip(ln);
    } catch (IOException e) {
      handleIOException(e);
      return 0;
    }
  }
665094
function(iterator, context) {
            if (context != null) iterator = _.bind(iterator, context);
            _.each(this.components, function(value, cid) {
                if (_.isArray(value)) {
                    _.each(value, iterator);
                } else {
                    iterator(value);
                }
            });
            return this;
        }
774292
private int skipForward() {
        int numSkips = 0;
        _next = null;
        while (_iterator.hasNext() && getBlock(_next = _iterator.next()) != 0) {
            numSkips++;
            _next = null;
        }
        return numSkips;
    }
1306309
public static <E> Iterator<E> unmodifiableIterator(final Iterator<E> it) {
	return new Iterator<E>() {
	    public boolean hasNext() { return it.hasNext(); }
	    public E       next()    { return it.next(); }
	    public void    remove()  { throw new UnsupportedOperationException(); }
	};
    }
1298973
@Override
  public Iterator<Reader> iterator() {
    Collection<Object> newCollection = new ArrayList<Object>();
    for (Object o : c) {
      if (o instanceof Reader) {
        String name = o.toString()+".tmp";
        File tmpFile;
        try {
          tmpFile = File.createTempFile(name,"");
        } catch (Exception e) {
          throw new RuntimeException(e.getMessage());
        }
        tmpFile.deleteOnExit();
        StringUtils.printToFile(tmpFile, IOUtils.slurpReader((Reader)o),
                                false, false, enc);
        newCollection.add(tmpFile);
      } else {
        newCollection.add(o);
      }
    }
    c = newCollection;
    return new ReaderIterator();
  }
746375
@SuppressWarnings("rawtypes")
    private static Object findFirstNonNull(Iterator it) {
        Object result = null;
        while(it.hasNext()) {
            result = it.next();
            if(result != null) {
                break;
            }
        }
        return result;
    }
647140
private void setResultIterator(MutableObjectIterator<BinaryRow> iterator) {
		synchronized (this.iteratorLock) {
			// set the result iterator only, if no exception has occurred
			if (this.iteratorException == null) {
				this.iterator = iterator;
				this.iteratorLock.notifyAll();
			}
		}
	}
445756
protected void removeListeningIterator(IClockwiseIterator iterator) {
		if (this.listeningIterators != null) {
			this.listeningIterators.remove(iterator);
			if (this.listeningIterators.isEmpty()) {
				this.listeningIterators = null;
			}
		}
	}
287584
protected static void writeIterator(Output out, Iterator<Object> it) {
        log.trace("writeIterator");
        // Create LinkedList of collection we iterate thru and write it out later
        LinkedList<Object> list = new LinkedList<Object>();
        while (it.hasNext()) {
            list.addLast(it.next());
        }
        // Write out collection
        out.writeArray(list);
    }