com.atlassian.user.search.page
Interface Pager

All Known Implementing Classes:
AbstractPrefetchingPager, DefaultPager, MergedListPager, MergedPager

public interface Pager


Field Summary
static Pager EMPTY_PAGER
           
static int NO_POSITION
           
static int PRELOAD_LIMIT
          Maximum number of elements to hold in memory at a given moment.
 
Method Summary
 java.util.List getCurrentPage()
           
 int getIndex()
           
 int getIndexOfFirstItemInCurrentPage()
           
 boolean isEmpty()
           
 java.util.Iterator iterator()
          Use this if you want a typical iterator over the entire data.
 void nextPage()
           
 boolean onLastPage()
           
 void skipTo(int index)
          Will run the index up to this point.
 

Field Detail

EMPTY_PAGER

public static final Pager EMPTY_PAGER

PRELOAD_LIMIT

public static final int PRELOAD_LIMIT
Maximum number of elements to hold in memory at a given moment.

See Also:
Constant Field Values

NO_POSITION

public static final int NO_POSITION
See Also:
Constant Field Values
Method Detail

isEmpty

public boolean isEmpty()

iterator

public java.util.Iterator iterator()
Use this if you want a typical iterator over the entire data.

Returns:
an Iterator for the entire result set.

getCurrentPage

public java.util.List getCurrentPage()
Returns:
a single, preloaded page.

nextPage

public void nextPage()

onLastPage

public boolean onLastPage()

skipTo

public void skipTo(int index)
            throws PagerException
Will run the index up to this point. Calling getCurrentPage() will then return a page holding this index.

Parameters:
index - the zero-based index of the item to skip to.
Throws:
PagerException - - if the number of items in the backing data is exceeded by the index.

getIndex

public int getIndex()
Returns:
the current index position of the pager

getIndexOfFirstItemInCurrentPage

public int getIndexOfFirstItemInCurrentPage()
Returns:
the index of the first item in the current page, relative to the start of the set


Copyright © 2005-2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.