net.wotonomy.foundation.internal
Class PropertyComparator

java.lang.Object
  extended by net.wotonomy.foundation.internal.PropertyComparator
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator

public class PropertyComparator
extends java.lang.Object
implements java.util.Comparator, java.io.Serializable

A Comparator that will sort elements based on the property specified in the constructor.

Version:
$Revision: 893 $
Author:
michael@mpowers.net, $Author: cgruber $
See Also:
Serialized Form

Constructor Summary
PropertyComparator(java.lang.String aProperty)
          Standard constructor to configure the comparator.
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
           
 boolean equals(java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyComparator

public PropertyComparator(java.lang.String aProperty)
Standard constructor to configure the comparator.

Parameters:
aProperty - A property whose value is used to sort elements.
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Specified by:
compare in interface java.util.Comparator

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface java.util.Comparator
Overrides:
equals in class java.lang.Object


Copyright © 2006 null. All Rights Reserved.