edu.utah.further.core.math.misc
Class ComparablePair<A extends Comparable<A>,B extends Comparable<B>>
java.lang.Object
edu.utah.further.core.math.misc.Pair<A,B>
edu.utah.further.core.math.misc.ComparablePair<A,B>
- All Implemented Interfaces:
- Comparable<ComparablePair<A,B>>
- Direct Known Subclasses:
- IntegerPair, StringPair
@Api
public class ComparablePair<A extends Comparable<A>,B extends Comparable<B>>
- extends Pair<A,B>
- implements Comparable<ComparablePair<A,B>>
A pair of comparable objects.
-----------------------------------------------------------------------------------
(c) 2008-2011 FURTHeR Project, Health Sciences IT, University of Utah
Contact: Dr. Scott Narus <scott.narus@hsc.utah.edu>
Biomedical Informatics, 26 South 2000 East
Room 5775 HSEB, Salt Lake City, UT 84112
Day Phone: 1-801-213-3288
-----------------------------------------------------------------------------------
- Version:
- May 29, 2009
- Author:
- Oren E. Livne
<oren.livne@utah.edu>
Nested classes/interfaces inherited from class edu.utah.further.core.math.misc.Pair |
Pair.Element |
Fields inherited from class edu.utah.further.core.math.misc.Pair |
left, right |
Method Summary |
int |
compareTo(ComparablePair<A,B> other)
Compare two pairs by lexicographic order (first in, left, then in right). |
ComparablePair
public ComparablePair(A left,
B right)
- Parameters:
left
- right
-
compareTo
public final int compareTo(ComparablePair<A,B> other)
- Compare two pairs by lexicographic order (first in, left, then in right).
Compatible with the
equals()
method if and only if the
compareTo()
method in types A
and B
are
Compatible with the corresponding equals()
methods therein.
- Specified by:
compareTo
in interface Comparable<ComparablePair<A extends Comparable<A>,B extends Comparable<B>>>
- Parameters:
other
- the other Pair
to be compared with this one.
- Returns:
- the result of comparison
Copyright © 2011 Office of the AVP for Health Sci. IT. All Rights Reserved.