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

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

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

Class to do a "natural order" comparison on this class.


Constructor Summary
PairUtil.CompareNatural()
           
 
Method Summary
 int compare(Pair<? extends FIRST,? extends SECOND> o1, Pair<? extends FIRST,? extends SECOND> o2)
          Compare by first, then by second.
 
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.CompareNatural

public PairUtil.CompareNatural()
Method Detail

compare

public int compare(Pair<? extends FIRST,? extends SECOND> o1,
                   Pair<? extends FIRST,? extends SECOND> o2)
Compare by first, then by second.

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

Release 0.4.0 (2011-09-20_1324)