java.lang.Object | |
↳ | org.springframework.beans.support.PropertyComparator |
PropertyComparator performs a comparison of two beans, evaluating the specified bean property via a BeanWrapper.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
logger |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new PropertyComparator for the given SortDefinition.
| |||||||||||
Create a PropertyComparator for the given settings.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the SortDefinition that this comparator uses.
| |||||||||||
Sort the given source according to the given sort definition.
| |||||||||||
Sort the given List according to the given sort definition.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
java.util.Comparator
|
Create a new PropertyComparator for the given SortDefinition.
Create a PropertyComparator for the given settings.
property | the property to compare |
---|---|
ignoreCase | whether upper and lower case in String values should be ignored |
ascending | whether to sort ascending (true) or descending (false) |
Return the SortDefinition that this comparator uses.
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.
source | input source |
---|---|
sortDefinition | the parameters to sort by |
IllegalArgumentException | in case of a missing propertyName |
---|---|
BeansException |
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.
source | the input List |
---|---|
sortDefinition | the parameters to sort by |
IllegalArgumentException | in case of a missing propertyName |
---|---|
BeansException |