Class PaginationAction.PaginationIterator<E>
- java.lang.Object
-
- net.dv8tion.jda.api.requests.restaction.pagination.PaginationAction.PaginationIterator<E>
-
- All Implemented Interfaces:
java.util.Iterator<E>
- Enclosing interface:
- PaginationAction<T,M extends PaginationAction<T,M>>
public static class PaginationAction.PaginationIterator<E> extends java.lang.Object implements java.util.Iterator<E>
Iterator implementation for aPaginationAction
.
This iterator will first iterate over all currently cached entities and continue to retrieve new entities as needed.To retrieve new entities after reaching the end of the current cache, this iterator will request a List of new entities through a call of
RestAction.complete()
.
It is recommended to use the highest possible limit for this task. (seePaginationAction.limit(int)
)
-
-
Constructor Summary
Constructors Constructor Description PaginationIterator(java.util.Collection<E> queue, java.util.function.Supplier<java.util.List<E>> supply)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
E
next()
-