/** Remove the current member from the underlying iterator. Legal only after a .next() but before any subsequent .hasNext(), because that may advance the underlying iterator. */ @Override public void remove() { if (!canRemove ) throw new IllegalStateException ( "FilterIterators do not permit calls to hasNext between calls to next and remove." ); super.remove(); }
@Override public void remove() { super.remove(); current.remove(); }