PagedListConverter<U,V> Class

  • java.lang.Object
    • com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter<U,V>

Type Parameters

U

the type of Resource to convert from

V

the type of Resource to convert to

public class PagedListConverter<U,V>

The base class for converting PagedList of one type of resource to another, without polling down all the items in a list. This converter is useful in converting inner top level resources into fluent top level resources.

Method Summary

Modifier and Type Method and Description
PagedList<V> convert(final PagedList<U> uList)

Converts the paged list.

boolean filter(U u)

Override this method to define what items should be fetched.

abstract V typeConvert(U u)

Override this method to define how to convert each Resource item individually.

Method Details

convert

public PagedList convert(final PagedList uList)

Converts the paged list.

Parameters:

uList - the resource list to convert from

Returns:

the converted list

filter

protected boolean filter(U u)

Override this method to define what items should be fetched.

Parameters:

u - an original item to test

Returns:

true if this item should be fetched

typeConvert

public abstract V typeConvert(U u)

Override this method to define how to convert each Resource item individually.

Parameters:

u - the resource to convert from

Returns:

the converted resource

Applies to