T
- type of iterated entitypublic abstract class BoxResourceIterable<T> extends Object implements Iterable<T>
Modifier and Type | Field and Description |
---|---|
static String |
BODY_PARAMETER_ENTRIES
Body parameter for page entries.
|
static String |
BODY_PARAMETER_MARKER_NEXT
Body Parameter for marker for the beginning of next page.
|
static String |
PARAMETER_LIMIT
Parameter for max page size.
|
static String |
PARAMETER_MARKER
Parameter for marker for the beginning of next page.
|
Constructor and Description |
---|
BoxResourceIterable(BoxAPIConnection api,
URL url,
int limit)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract T |
factory(JsonObject jsonObject)
Factory to build a new instance for a received JSON item.
|
Iterator<T> |
iterator()
Builds internal read-only iterator over
BoxResource -s. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static final String PARAMETER_LIMIT
public static final String PARAMETER_MARKER
public static final String BODY_PARAMETER_MARKER_NEXT
public static final String BODY_PARAMETER_ENTRIES
public BoxResourceIterable(BoxAPIConnection api, URL url, int limit)
api
- the API connection to be used by the resourceurl
- to end-point with paging supportlimit
- the maximum number of items to return in a pageprotected abstract T factory(JsonObject jsonObject)
jsonObject
- of the itempublic Iterator<T> iterator()
BoxResource
-s.iterator
in interface Iterable<T>
Iterable.iterator()