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.
|
BoxResourceIterable(BoxAPIConnection api,
URL url,
int limit,
JsonObject body)
Constructor.
|
BoxResourceIterable(BoxAPIConnection api,
URL url,
int limit,
JsonObject body,
String marker)
Constructor.
|
BoxResourceIterable(BoxAPIConnection api,
URL url,
int limit,
String marker)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract T |
factory(JsonObject jsonObject)
Factory to build a new instance for a received JSON item.
|
String |
getNextMarker()
Builds internal read-only iterator over
BoxResource -s. |
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
- endpoint with paging supportlimit
- the maximum number of items to return in a pagepublic BoxResourceIterable(BoxAPIConnection api, URL url, int limit, JsonObject body)
api
- the API connection to be used by the resource.url
- to endpoint with paging support.limit
- the maximum number of items to return in a page.body
- the body to send to the requested endpoint.public BoxResourceIterable(BoxAPIConnection api, URL url, int limit, String marker)
api
- the API connection to be used by the resource.url
- to endpoint with paging support.limit
- the maximum number of items to return in a page.marker
- the marker where the iterator will beginpublic BoxResourceIterable(BoxAPIConnection api, URL url, int limit, JsonObject body, String marker)
api
- the API connection to be used by the resource.url
- to endpoint with paging support.limit
- the maximum number of items to return in a page.body
- the body to send to the requested endpoint.marker
- the marker where the iterator will beginprotected abstract T factory(JsonObject jsonObject)
jsonObject
- of the itempublic Iterator<T> iterator()
BoxResource
-s.iterator
in interface Iterable<T>
Iterable.iterator()
public String getNextMarker()
BoxResource
-s.Iterable.iterator()