net.sf.doolin.util
Class PropertyComparator

java.lang.Object
  extended by 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

Constructor Summary
PropertyComparator(String property)
          Constructor
 
Method Summary
 int compare(Object arg0, Object arg1)
          Compares two objects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

PropertyComparator

public PropertyComparator(String property)
Constructor

Parameters:
property - Property of the object to be compare of.
Method Detail

compare

public int compare(Object arg0,
                   Object arg1)
Compares two objects

Specified by:
compare in interface Comparator<Object>
Parameters:
arg0 - First object to compare
arg1 - Second object to compare
Returns:
Result of the comparison
See Also:
Comparator.compare(T, T)


Copyright © 2011. All Rights Reserved.