net.sf.doolin.util
Class PropertyComparator
java.lang.Object
net.sf.doolin.util.PropertyComparator
- All Implemented Interfaces:
- Comparator<Object>
public class PropertyComparator
- extends Object
- implements Comparator<Object>
Comparator based upon a property
- Author:
- Damien Coraboeuf
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyComparator
public PropertyComparator(String property)
- Constructor
- Parameters:
property - Property of the object to be compare of.
compare
public int compare(Object arg0,
Object arg1)
- Compares two objects
- Specified by:
compare in interface Comparator<Object>
- Parameters:
arg0 - First object to comparearg1 - Second object to compare
- Returns:
- Result of the comparison
- See Also:
Comparator.compare(T, T)
Copyright © 2011. All Rights Reserved.