Package org.aksw.commons.collections
Class FilteringListIterator<T,I extends ListIterator<T>>
java.lang.Object
org.aksw.commons.collections.FilteringListIterator<T,I>
- All Implemented Interfaces:
Iterator<T>,ListIterator<T>
public class FilteringListIterator<T,I extends ListIterator<T>>
extends Object
implements ListIterator<T>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFilteringListIterator(I core, Predicate<? super T> predicate, int currentIndex) -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic voidcheckDistance(int distance) booleanhasNext()booleannext()intprevious()intvoidremove()voidvoidsetWasPreviousOrNextCalled(boolean flag) protected booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
core
-
predicate
-
currentIndex
protected int currentIndex -
wasPreviousOrNextCalled
protected boolean wasPreviousOrNextCalled
-
-
Constructor Details
-
FilteringListIterator
-
-
Method Details
-
setWasPreviousOrNextCalled
public void setWasPreviousOrNextCalled(boolean flag) -
checkDistance
public static void checkDistance(int distance) -
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceListIterator<T>
-
previous
- Specified by:
previousin interfaceListIterator<T>
-
nextIndex
public int nextIndex()- Specified by:
nextIndexin interfaceListIterator<T>
-
previousIndex
public int previousIndex()- Specified by:
previousIndexin interfaceListIterator<T>
-
set
- Specified by:
setin interfaceListIterator<T>
-
add
- Specified by:
addin interfaceListIterator<T>
-
test
-