Package org.apache.juneau.objecttools
Class ObjectPaginator
java.lang.Object
org.apache.juneau.objecttools.ObjectPaginator
- All Implemented Interfaces:
- ObjectTool<PageArgs>
POJO model paginator.
 
This class is designed to extract sublists from arrays/collections of maps or beans.
Example:
   MyBean[] 
The tool can be used against the following data types:
- Arrays/collections of maps or beans.
See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ObjectPaginatorcreate()Static creator.<R> List<R>Convenience method for executing the paginator.run(BeanSession session, Object input, PageArgs args) Converts the specified input to some other output.
- 
Constructor Details- 
ObjectPaginatorpublic ObjectPaginator()
 
- 
- 
Method Details- 
createStatic creator.- Returns:
- A new ObjectPaginatorobject.
 
- 
runConvenience method for executing the paginator.- Type Parameters:
- R- The collection element type.
- Parameters:
- input- The input. Must be a collection or array of objects.
- pos- The zero-index position to start from.
- limit- The max number of entries to retrieve.
- Returns:
- A sublist of representing the entries from the position with the specified limit.
 
- 
runDescription copied from interface:ObjectToolConverts the specified input to some other output.- Specified by:
- runin interface- ObjectTool<PageArgs>
- Parameters:
- session- The current bean session.
- input- The input POJO.
- args- The arguments.
- Returns:
- The output POJO.
 
 
-