@Override
    public void forEachRemaining(Consumer<? super T> action) {
        if (action == null) {
            throw new NullPointerException();
        }
        while(it.hasNext()) {
            action.accept(it.next());
        }
    }
@ Override public void forEachRemaining ( Consumer < ? super T > action ) { if ( action == null ) { throw new NullPointerException ( ) ; } while ( it . hasNext ( ) ) { action . accept ( it . next ( ) ) ; } }
{@inheritDoc}