Search in sources :

Example 1 with PageImpl

use of com.microsoft.azure.management.resources.implementation.PageImpl in project azure-sdk-for-java by Azure.

the class GroupPagedList method nextPage.

@Override
public Page<E> nextPage(String s) {
    if (resourceGroupItr.hasNext()) {
        ResourceGroup resourceGroup = resourceGroupItr.next();
        PageImpl<E> page = new PageImpl<>();
        page.setItems(listNextGroup(resourceGroup.name()));
        page.setNextPageLink(s);
        return page;
    } else {
        // return an empty page without next link so that iteration will terminate
        PageImpl<E> page = new PageImpl<>();
        page.setItems(new ArrayList<E>());
        return page;
    }
}
Also used : PageImpl(com.microsoft.azure.management.resources.implementation.PageImpl) ResourceGroup(com.microsoft.azure.management.resources.ResourceGroup)

Aggregations

ResourceGroup (com.microsoft.azure.management.resources.ResourceGroup)1 PageImpl (com.microsoft.azure.management.resources.implementation.PageImpl)1