public void addIterator(Iterator<? extends E> iterator) {
        checkLocked();
        if (iterator == null) {
            throw new NullPointerException("Iterator must not be null");
        }
        iteratorChain.add(iterator);
    }
Add an Iterator to the end of the chain

@param iterator Iterator to add
@throws IllegalStateException if I've already started iterating
@throws NullPointerException  if the iterator is null
jphp-runtime/src/php/runtime/common/collections/iterators/IteratorChain.java