Class PagedList<E>
- java.lang.Object
-
- org.apache.ofbiz.base.util.collections.PagedList<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>
public class PagedList<E> extends java.lang.Object implements java.lang.Iterable<E>
Stores the result of a subset of data items from a source (such as EntityListIterator).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <E> PagedList<E>
empty(int viewIndex, int viewSize)
java.util.List<E>
getData()
int
getEndIndex()
int
getSize()
int
getStartIndex()
int
getViewIndex()
int
getViewSize()
java.util.Iterator<E>
iterator()
-
-
-
Field Detail
-
startIndex
protected int startIndex
-
endIndex
protected int endIndex
-
size
protected int size
-
viewIndex
protected int viewIndex
-
viewSize
protected int viewSize
-
data
protected java.util.List<E> data
-
-
Constructor Detail
-
PagedList
public PagedList(int startIndex, int endIndex, int size, int viewIndex, int viewSize, java.util.List<E> data)
Default constructor - populates all fields in this class- Parameters:
startIndex
-endIndex
-size
-viewIndex
-viewSize
-data
-
-
-
Method Detail
-
empty
public static <E> PagedList<E> empty(int viewIndex, int viewSize)
- Parameters:
viewIndex
-viewSize
-- Returns:
- an empty PagedList object
-
getStartIndex
public int getStartIndex()
- Returns:
- the start index (for paginator) or known as low index
-
getEndIndex
public int getEndIndex()
- Returns:
- the end index (for paginator) or known as high index
-
getSize
public int getSize()
- Returns:
- the size of the full list, this can be the
result of
EntityListIterator.getResultsSizeAfterPartialList()
-
getData
public java.util.List<E> getData()
- Returns:
- the paged data. Eg - the result from
EntityListIterator.getPartialList()
-
getViewIndex
public int getViewIndex()
- Returns:
- the view index supplied by client
-
getViewSize
public int getViewSize()
- Returns:
- the view size supplied by client
-
-