Skip to content

Commit

Permalink
Removed remove() operation from FilteredIterator
Browse files Browse the repository at this point in the history
FilteredIterator can not support remove() operation at the current time in a correct way since it needs to look ahead on the underlying iterator.
  • Loading branch information
Tim Hinkes committed Jun 5, 2017
1 parent 249bb28 commit 485e6d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/cactoos/list/FilteredIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ public X next() {

@Override
public void remove() {
this.iterator.remove();
throw new UnsupportedOperationException(
"FilteredIterator does not support remove Operation"
);
}

}

0 comments on commit 485e6d1

Please sign in to comment.