T
- item typeR
- low level result typepublic abstract class Page<T,R>
extends java.lang.Object
implements java.lang.Iterable<T>
Modifier and Type | Field and Description |
---|---|
private java.util.List<T> |
content |
private R |
lowLevelResult |
Constructor and Description |
---|
Page(java.util.List<T> content,
R lowLevelResult) |
Modifier and Type | Method and Description |
---|---|
R |
getLowLevelResult() |
abstract boolean |
hasNextPage()
Checks whether this page has a "next page." If this method returns
true, the next page can be retrieved by calling
next . |
java.util.Iterator<T> |
iterator() |
abstract Page<T,R> |
nextPage()
Retrieves the next page.
|
int |
size() |
java.lang.String |
toString() |
private final java.util.List<T> content
private final R lowLevelResult
public abstract boolean hasNextPage()
next
. If it
returns false, any call to next
will be guaranteed to throw an
IllegalStateException
.public abstract Page<T,R> nextPage()
java.util.NoSuchElementException
- if there is no next pageAmazonServiceException
- on error making the remote callpublic final int size()
public final java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public java.lang.String toString()
toString
in class java.lang.Object
public final R getLowLevelResult()