public class MinusIteration<E,X extends Exception> extends FilterIteration<E,X>
Note that duplicates can also be filtered by wrapping this Iteration in a DistinctIteration
, but that has a
bit more overhead as it adds a second hash table lookup.
wrappedIter
Constructor and Description |
---|
MinusIteration(Iteration<? extends E,X> leftArg,
Iteration<? extends E,X> rightArg)
Creates a new MinusIteration that returns the results of the left argument minus the results of the right
argument.
|
MinusIteration(Iteration<? extends E,X> leftArg,
Iteration<? extends E,X> rightArg,
boolean distinct)
Creates a new MinusIteration that returns the results of the left argument minus the results of the right
argument.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
accept(E object)
Tests whether or not the specified object should be returned by this Iteration.
|
protected void |
handleClose()
Closes this Iteration and also closes the wrapped Iteration if it is a
CloseableIteration . |
hasNext, next
remove
close, isClosed
public MinusIteration(Iteration<? extends E,X> leftArg, Iteration<? extends E,X> rightArg)
leftArg
- An Iteration containing the main set of elements.rightArg
- An Iteration containing the set of elements that should be filtered from the main set.public MinusIteration(Iteration<? extends E,X> leftArg, Iteration<? extends E,X> rightArg, boolean distinct)
leftArg
- An Iteration containing the main set of elements.rightArg
- An Iteration containing the set of elements that should be filtered from the main set.distinct
- Flag indicating whether duplicate elements should be filtered from the result.protected boolean accept(E object) throws X extends Exception
FilterIteration
protected void handleClose() throws X extends Exception
IterationWrapper
CloseableIteration
.handleClose
in class FilterIteration<E,X extends Exception>
X
X extends Exception
Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.