BaseResourceCollectionEnumerator<T> Class

Type Parameters

T

Implements

public abstract class BaseResourceCollectionEnumerator<T> extends BasePartnerComponentString implements IResourceCollectionEnumerator<T>

Base implementation for resource collection enumerators.

Constructor Summary

Modifier Constructor Description
protected BaseResourceCollectionEnumerator(IPartner rootPartnerOperations, T resourceCollection, ObjectMapper resourceCollectionConverter, TypeReference<T> responseType)

Initializes a new instance of the BaseResourceCollectionEnumerator class.

Method Summary

Modifier and Type Method and Description
T getCurrent()

The current resource collection.

boolean hasValue()

Gets whether the current result collection has a value or not.

boolean isFirstPage()

Gets whether the current collection is the first page of results or not.

boolean isLastPage()

Gets whether the current collection is the last page of results or not.

void next()

Retrieves the next result set.

void next(IRequestContext context)

Retrieves the next result set.

void previous()

Retrieves the previous result set.

void previous(IRequestContext context)

Retrieves the previous result set.

Inherited Members

BasePartnerComponent<TContext>.getContext() BasePartnerComponent<TContext>.getPartner() java.lang.Object.clone() java.lang.Object.equals(java.lang.Object) java.lang.Object.finalize() java.lang.Object.getClass() java.lang.Object.hashCode() java.lang.Object.notify() java.lang.Object.notifyAll() java.lang.Object.toString() java.lang.Object.wait() java.lang.Object.wait(long) java.lang.Object.wait(long,int)

Constructor Details

BaseResourceCollectionEnumerator

protected BaseResourceCollectionEnumerator(IPartner rootPartnerOperations, T resourceCollection, ObjectMapper resourceCollectionConverter, TypeReference responseType)

Initializes a new instance of the BaseResourceCollectionEnumerator class.

Parameters:

rootPartnerOperations - The root partner operations instance.
resourceCollection - The initial resource collection.
resourceCollectionConverter - An optional converter.
responseType - The type of the resource collection.

Method Details

getCurrent

public T getCurrent()

The current resource collection.

Returns:

The current resource collection.

hasValue

public boolean hasValue()

Gets whether the current result collection has a value or not. This indicates if the collection has been fully enumerated or not.

Returns:

A flag indicating whether the current result collection has a value or not.

isFirstPage

public boolean isFirstPage()

Gets whether the current collection is the first page of results or not.

Returns:

A flag indicating whether the current collection is the first page of results or not.

isLastPage

public boolean isLastPage()

Gets whether the current collection is the last page of results or not.

Returns:

A flag indicating whether the current collection is the last page of results or not.

next

public void next()

Retrieves the next result set.

next

public void next(IRequestContext context)

Retrieves the next result set.

Parameters:

context - The request context.

previous

public void previous()

Retrieves the previous result set.

previous

public void previous(IRequestContext context)

Retrieves the previous result set.

Parameters:

context - The request context.

Applies to