Class FilterableIterator<K>
java.lang.Object
com.teampotato.potacore.iteration.FilterableIterator<K>
- Type Parameters:
K- generics object
- All Implemented Interfaces:
CloseableIterator<K>,AutoCloseable,Iterator<K>
Alternative of
Iterators.filter(Iterator, com.google.common.base.Predicate), but auto closeable-
Field Summary
Fields inherited from interface com.teampotato.potacore.iteration.CloseableIterator
LOGGER -
Constructor Summary
ConstructorsConstructorDescriptionFilterableIterator(@NotNull Iterator<K> iterator, @NotNull Predicate<K> filter) -
Method Summary
-
Constructor Details
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
forEachRemaining
- Specified by:
forEachRemainingin interfaceIterator<K>
-
remove
public void remove() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-