public class Pager<T>
Provides access to a collection of data paging them as needed.
Only a subset of the data is loaded on to memory. This window can be configured using Pager.setPageSize
This can be passed across process using AIDL or Remoter
Pager.setPageSize
Constructor and Description |
---|
Pager()
Creates an instance of Pager
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the data source, performs any cleanup as needed
|
T |
get()
Returns the data at the given position
|
PagerNotifier<T> |
getPagerNotifier()
Returns the PagerNotifier which can be used to replace a data or update the whole data. Applicable only at the process that created this Pager instance. May return null at the client side
|
java.util.Iterator<T> |
iterator() |
void |
setPageSize()
Sets the paging getDataSize
|
void |
setPagerListener()
Sets a PagerListener to listen for data replacements or data updates
|
int |
size()
Returns the number of elements
|
public T get()
Returns the data at the given position
public int size()
Returns the number of elements
public void setPageSize()
Sets the paging getDataSize
public java.util.Iterator<T> iterator()
public void setPagerListener()
Sets a PagerListener to listen for data replacements or data updates
public PagerNotifier<T> getPagerNotifier()
Returns the PagerNotifier which can be used to replace a data or update the whole data.
Applicable only at the process that created this Pager instance. May return null at the client side
public void close()
Close the data source, performs any cleanup as needed