open class PropertyComparator<T : Any> : Comparator<T>
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
PropertyComparator(sortDefinition: SortDefinition)
Create a new PropertyComparator for the given SortDefinition. PropertyComparator(property: String, ignoreCase: Boolean, ascending: Boolean)
Create a PropertyComparator for the given settings. |
open fun compare(o1: T, o2: T): Int |
|
fun getSortDefinition(): SortDefinition
Return the SortDefinition that this comparator uses. |
|
open static fun sort(source: MutableList<*>, sortDefinition: SortDefinition): Unit
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. open static fun sort(source: Array<Any>, sortDefinition: SortDefinition): Unit
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. |