| java.lang.Object org.kuali.core.util.BeanPropertyComparator
BeanPropertyComparator | public class BeanPropertyComparator implements Comparator,Serializable(Code) | | This class compares the two beans using multiple property names.
|
Constructor Summary | |
public | BeanPropertyComparator(List propertyNames) Constructs a PropertyComparator for comparing beans using the properties named in the given List; if the List is null, the
beans will be compared directly (by Properties will be compared in the order in which they are listed. | public | BeanPropertyComparator(List propertyNames, boolean ignoreCase) Constructs a PropertyComparator for comparing beans using the properties named in the given List. |
Method Summary | |
public int | compare(Object o1, Object o2) Compare two JavaBeans by the properties given to the constructor. |
ignoreCase | boolean ignoreCase(Code) | | |
BeanPropertyComparator | public BeanPropertyComparator(List propertyNames)(Code) | | Constructs a PropertyComparator for comparing beans using the properties named in the given List; if the List is null, the
beans will be compared directly (by Properties will be compared in the order in which they are listed. Case will be ignored
in String comparisons.
Parameters: propertyNames - List of property names (as Strings) used to compare beans |
BeanPropertyComparator | public BeanPropertyComparator(List propertyNames, boolean ignoreCase)(Code) | | Constructs a PropertyComparator for comparing beans using the properties named in the given List. Properties will be compared
in the order in which they are listed. Case will be ignored if ignoreCase is true.
Parameters: propertyNames - List of property names (as Strings) used to compare beans Parameters: ignoreCase - if true, case will be ignored during String comparisons |
compare | public int compare(Object o1, Object o2)(Code) | | Compare two JavaBeans by the properties given to the constructor. If no propertues
Parameters: o1 - Object The first bean to get data from to compare against Parameters: o2 - Object The second bean to get data from to compare int negative or positive based on order |
|
|