Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.utilities.pairs
Class CPair.CompareSwapped<FIRST extends Comparable<FIRST>,SECOND extends Comparable<SECOND>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.pairs.CPair.CompareSwapped<FIRST,SECOND>
Type Parameters:
FIRST -
SECOND -
All Implemented Interfaces:
Comparator<CPair<FIRST,SECOND>>
Enclosing class:
CPair<FIRST extends Comparable<FIRST>,SECOND extends Comparable<SECOND>>

public static final class CPair.CompareSwapped<FIRST extends Comparable<FIRST>,SECOND extends Comparable<SECOND>>
extends Object
implements Comparator<CPair<FIRST,SECOND>>

Class to do a canonical swapped comparison on this class.


Constructor Summary
CPair.CompareSwapped()
           
 
Method Summary
 int compare(CPair<FIRST,SECOND> o1, CPair<FIRST,SECOND> o2)
          Compare by second component, using the ComparableSwapped interface.
 
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

CPair.CompareSwapped

public CPair.CompareSwapped()
Method Detail

compare

public int compare(CPair<FIRST,SECOND> o1,
                   CPair<FIRST,SECOND> o2)
Compare by second component, using the ComparableSwapped interface.

Specified by:
compare in interface Comparator<CPair<FIRST extends Comparable<FIRST>,SECOND extends Comparable<SECOND>>>
Parameters:
o1 - First object
o2 - Second object

Release 0.2.1 (2009-07-13_1605)