com.townleyenterprises.filter
Class PropertySorter

java.lang.Object
  extended bycom.townleyenterprises.common.PropertyProxy
      extended bycom.townleyenterprises.filter.PropertySorter
All Implemented Interfaces:
java.util.Comparator

public final class PropertySorter
extends PropertyProxy
implements java.util.Comparator

This class sorts Comparable objects and orders them based on the specified SortSpecifications.

Since:
2.0
Version:
$Id: PropertySorter.java,v 1.3 2004/07/28 10:33:58 atownley Exp $
Author:
Andrew S. Townley

Constructor Summary
PropertySorter(java.lang.Class klass, SortSpecification[] spec)
          The constructor specifies the class of the objects to be sorted and the collation specifications to be used.
 
Method Summary
 int compare(java.lang.Object rhs, java.lang.Object lhs)
           
 
Methods inherited from class com.townleyenterprises.common.PropertyProxy
getPropertyValue, getSubjectClass
 
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

PropertySorter

public PropertySorter(java.lang.Class klass,
                      SortSpecification[] spec)
The constructor specifies the class of the objects to be sorted and the collation specifications to be used.

Parameters:
klass - the class of the objects to be sorted
spec - the sort specification
Method Detail

compare

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


Copyright © 2002-2004, Andrew S. Townley and Townley Enterprises. All Rights Reserved.
This project is hosted on http://te-code.sourceforge.net.