-
- All Implemented Interfaces:
public interface Content.IteratorIterates through a list of Element items asynchronously.
hasNext and hasPrevious refer to the last element computed by a previous call to any of both methods.
-
-
Method Summary
Modifier and Type Method Description abstract BooleanhasNext()Returns true if the iterator has a next element, suspending the caller while processing it. abstract Content.Elementnext()Retrieves the element computed by a preceding call to hasNext, or throws an IllegalStateException if hasNext was not invoked. Content.ElementnextOrNull()Advances to the next item and returns it, or null if we reached the end. abstract BooleanhasPrevious()Returns true if the iterator has a previous element, suspending the caller while processing it. abstract Content.Elementprevious()Retrieves the element computed by a preceding call to hasPrevious, or throws an IllegalStateException if hasPrevious was not invoked. Content.ElementpreviousOrNull()Advances to the previous item and returns it, or null if we reached the beginning. -
-
Method Detail
-
hasNext
abstract Boolean hasNext()
Returns true if the iterator has a next element, suspending the caller while processing it.
-
next
abstract Content.Element next()
Retrieves the element computed by a preceding call to hasNext, or throws an IllegalStateException if hasNext was not invoked. This method should only be used in pair with hasNext.
-
nextOrNull
Content.Element nextOrNull()
Advances to the next item and returns it, or null if we reached the end.
-
hasPrevious
abstract Boolean hasPrevious()
Returns true if the iterator has a previous element, suspending the caller while processing it.
-
previous
abstract Content.Element previous()
Retrieves the element computed by a preceding call to hasPrevious, or throws an IllegalStateException if hasPrevious was not invoked. This method should only be used in pair with hasPrevious.
-
previousOrNull
Content.Element previousOrNull()
Advances to the previous item and returns it, or null if we reached the beginning.
-
-
-
-