| java.lang.Object org.springframework.beans.support.PropertyComparator
PropertyComparator | public class PropertyComparator implements Comparator(Code) | | PropertyComparator performs a comparison of two beans,
evaluating the specified bean property via a BeanWrapper.
author: Juergen Hoeller author: Jean-Pierre Pawlak since: 19.05.2003 See Also: org.springframework.beans.BeanWrapper |
Field Summary | |
final protected Log | logger |
Method Summary | |
public int | compare(Object o1, Object o2) | final public SortDefinition | getSortDefinition() Return the SortDefinition that this comparator uses. | public static void | sort(List source, SortDefinition sortDefinition) Sort the given List according to the given sort definition.
Note: Contained objects have to provide the given property
in the form of a bean property, i.e. | public static void | sort(Object[] source, SortDefinition sortDefinition) Sort the given source according to the given sort definition.
Note: Contained objects have to provide the given property
in the form of a bean property, i.e. |
logger | final protected Log logger(Code) | | |
PropertyComparator | public PropertyComparator(String property, boolean ignoreCase, boolean ascending)(Code) | | Create a PropertyComparator for the given settings.
Parameters: property - the property to compare Parameters: ignoreCase - whether upper and lower case in String values should be ignored Parameters: ascending - whether to sort ascending (true) or descending (false) |
getSortDefinition | final public SortDefinition getSortDefinition()(Code) | | Return the SortDefinition that this comparator uses.
|
sort | public static void sort(List source, SortDefinition sortDefinition) throws BeansException(Code) | | Sort the given List according to the given sort definition.
Note: Contained objects have to provide the given property
in the form of a bean property, i.e. a getXXX method.
Parameters: source - the input List Parameters: sortDefinition - the parameters to sort by throws: java.lang.IllegalArgumentException - in case of a missing propertyName |
sort | public static void sort(Object[] source, SortDefinition sortDefinition) throws BeansException(Code) | | Sort the given source according to the given sort definition.
Note: Contained objects have to provide the given property
in the form of a bean property, i.e. a getXXX method.
Parameters: source - input source Parameters: sortDefinition - the parameters to sort by throws: java.lang.IllegalArgumentException - in case of a missing propertyName |
|
|