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
-
Constructor Summary
-
Method Summary
-
Field Details
-
DEFAULT
Default reusable searcher.
-
-
Constructor Details
-
ObjectSorter
public ObjectSorter()
-
-
Method Details
-
create
Static creator.- Returns:
- A new
ObjectSorter
object.
-
run
Convenience method for executing the sorter.- Type Parameters:
R
- The return type.- Parameters:
input
- The input.sortArgs
- The sort arguments. SeeSortArgs
for format.- Returns:
- A list of maps/beans matching the
-
run
Description copied from interface:ObjectTool
Converts the specified input to some other output.- Specified by:
run
in interfaceObjectTool<SortArgs>
- Parameters:
session
- The current bean session.input
- The input POJO.args
- The arguments.- Returns:
- The output POJO.
-