Package org.apache.juneau.objecttools
Class ObjectSorter
java.lang.Object
org.apache.juneau.objecttools.ObjectSorter
- All Implemented Interfaces:
ObjectTool<SortArgs>
POJO model sorter.
This class is designed to sort arrays and collections of maps or beans.
Example:
MyBean[]
The tool can be used against the following data types:
- Arrays/collections of maps or beans.
The arguments are a simple comma-delimited list of property names optionally suffixed with
See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT
Default reusable searcher.
-
-
Constructor Details
-
ObjectSorter
public ObjectSorter()
-
-
Method Details
-
create
Static creator.- Returns:
- A new
ObjectSorterobject.
-
run
Description copied from interface:ObjectToolConverts the specified input to some other output.- Specified by:
runin interfaceObjectTool<SortArgs>- Parameters:
session- The current bean session.input- The input POJO.args- The arguments.- Returns:
- The output POJO.
-
run
Convenience method for executing the sorter.- Type Parameters:
R- The return type.- Parameters:
input- The input.sortArgs- The sort arguments. SeeSortArgsfor format.- Returns:
- A list of maps/beans matching the
-