public class BeanComparator<T> extends Object implements Comparator<T>
| Constructor and Description |
|---|
BeanComparator(Comparator<Object> comparator,
IValueProvider... valueProviders)
Constructor.
|
BeanComparator(Comparator<Object> comparator,
String... beanProperties)
Constructor.
|
BeanComparator(IValueProvider... valueProviders)
Constructor.
|
BeanComparator(String... beanProperties)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(T o1,
T o2) |
Comparator<Object> |
getComparator()
Returns the comparator used to compare the values.
|
IValueProvider[] |
getValueProviders()
Returns the value providers of this comparator.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalspublic BeanComparator(String... beanProperties)
beanProperties - the properties in order of priority.public BeanComparator(Comparator<Object> comparator, String... beanProperties)
comparator - the comparator to be usedbeanProperties - the properties in order of priority.public BeanComparator(IValueProvider... valueProviders)
valueProviders - the value providers for each of the properties to be comparedpublic BeanComparator(Comparator<Object> comparator, IValueProvider... valueProviders)
comparator - the comparator to be usedvalueProviders - the value providers for each of the properties to be comparedpublic Comparator<Object> getComparator()
public IValueProvider[] getValueProviders()
public int compare(T o1, T o2)
compare in interface Comparator<T>Copyright © 2014. All rights reserved.