Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.utilities.pairs
Class PairUtil.CompareNaturalSwapped<FIRST extends Comparable<? super FIRST>,SECOND extends Comparable<? super SECOND>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.pairs.PairUtil.CompareNaturalSwapped<FIRST,SECOND>
Type Parameters:
FIRST - First type
SECOND - Second type
All Implemented Interfaces:
Comparator<Pair<FIRST,SECOND>>
Enclosing class:
PairUtil

public static final class PairUtil.CompareNaturalSwapped<FIRST extends Comparable<? super FIRST>,SECOND extends Comparable<? super SECOND>>
extends Object
implements Comparator<Pair<FIRST,SECOND>>

Class to do a canonical swapped comparison on this class.


Constructor Summary
PairUtil.CompareNaturalSwapped()
           
 
Method Summary
 int compare(Pair<FIRST,SECOND> o1, Pair<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

PairUtil.CompareNaturalSwapped

public PairUtil.CompareNaturalSwapped()
Method Detail

compare

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

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

Release 0.3 (2010-03-31_1612)