Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.utilities
Class PropertyPermutationComparator<P>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.PropertyPermutationComparator<P>
Type Parameters:
P - the type of the IDPropertyPair to compare
All Implemented Interfaces:
Comparator<IDPropertyPair<P>>

public class PropertyPermutationComparator<P>
extends Object
implements Comparator<IDPropertyPair<P>>

Provides a comparator for an IDPropertyPair with property of type P

Author:
Arthur Zimek

Field Summary
private  Comparator<P> propertyComparator
          A comparator for type P.
 
Constructor Summary
PropertyPermutationComparator(Comparator<P> propertyComparator)
          Provides a comparator for an IDPropertyPair based on the given Comparator for type P.
 
Method Summary
 int compare(IDPropertyPair<P> o1, IDPropertyPair<P> o2)
          To Objects of type IDPropertyPair are compared based on the comparison of their property using the current propertyComparator.
 
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
 

Field Detail

propertyComparator

private Comparator<P> propertyComparator
A comparator for type P.

Constructor Detail

PropertyPermutationComparator

public PropertyPermutationComparator(Comparator<P> propertyComparator)
Provides a comparator for an IDPropertyPair based on the given Comparator for type P.

Parameters:
propertyComparator - a Comparator for type P to base the comparison of an IDPropertyPair on
Method Detail

compare

public int compare(IDPropertyPair<P> o1,
                   IDPropertyPair<P> o2)
To Objects of type IDPropertyPair are compared based on the comparison of their property using the current propertyComparator.

Specified by:
compare in interface Comparator<IDPropertyPair<P>>
See Also:
Comparator.compare(java.lang.Object, java.lang.Object)

Release 0.1 (2008-07-10_1838)