info.aduna.iteration
Class ReducedIteration<E,X extends Exception>
java.lang.Object
info.aduna.iteration.CloseableIterationBase<E,X>
info.aduna.iteration.IterationWrapper<E,X>
info.aduna.iteration.FilterIteration<E,X>
info.aduna.iteration.ReducedIteration<E,X>
- All Implemented Interfaces:
- CloseableIteration<E,X>, Iteration<E,X>
public class ReducedIteration<E,X extends Exception>
- extends FilterIteration<E,X>
Removes consecutive duplicates from the object stream.
- Author:
- Arjohn Kampman
|
Method Summary |
protected boolean |
accept(E nextObject)
Tests whether or not the specified object should be returned by this
Iteration. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReducedIteration
public ReducedIteration(Iteration<? extends E,? extends X> delegate)
accept
protected boolean accept(E nextObject)
- Description copied from class:
FilterIteration
- Tests whether or not the specified object should be returned by this
Iteration. All objects from the wrapped Iteration pass through this method
in the same order as they are coming from the wrapped Iteration.
- Specified by:
accept in class FilterIteration<E,X extends Exception>
- Parameters:
nextObject - The object to be tested.
- Returns:
- true if the object should be returned, false
otherwise.
Copyright © 2001-2012 Aduna. All Rights Reserved.