org.openmdx.compatibility.base.dataprovider.spi
Class AbstractComparator

java.lang.Object
  extended by org.openmdx.compatibility.base.dataprovider.spi.AbstractComparator
All Implemented Interfaces:
Comparator
Direct Known Subclasses:
DataproviderObjectComparator

public abstract class AbstractComparator
extends Object
implements Comparator

Author:
hburger To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Field Summary
protected  AttributeSpecifier[] order
           
 
Constructor Summary
AbstractComparator(AttributeSpecifier[] order)
           
 
Method Summary
 int compare(Object left, Object right)
           
protected abstract  Iterator getValues(Object candidate, String attribute)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

order

protected AttributeSpecifier[] order
Constructor Detail

AbstractComparator

public AbstractComparator(AttributeSpecifier[] order)
Method Detail

getValues

protected abstract Iterator getValues(Object candidate,
                                      String attribute)
Parameters:
attribute -
Returns:
an iterator for the values
Throws:
ClassCastException - If the filter is not applicable to the candidate

compare

public int compare(Object left,
                   Object right)
Specified by:
compare in interface Comparator

toString

public String toString()
Overrides:
toString in class Object


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.