|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.measure.EquatorialArcSortKey<A>
public class EquatorialArcSortKey<A extends EquatorialArc<A>>
A sort key
and comparator
that works with
equatorial arcs
, such as latitude
or
longitude
.
Because this class is a SortKey
, you may configure its instances with
a particular SortOrder
. This class adds additional configurability
by letting clients decide to compare angles as they are or, instead, in
normalized form. You may place instances of this
class in a CompoundComparator
.
Version Info:
$Revision: 1707 $ |
$Date: 2008-11-14 10:23:59 -0700 (Fri, 14 Nov 2008) $ |
$Author: dharland $ |
Constructor Summary | |
---|---|
EquatorialArcSortKey()
Creates a new instance. |
Method Summary | |
---|---|
int |
compare(A a1,
A a2)
|
SortOrder |
getOrder()
Returns the sort order. |
void |
setOrder(SortOrder newOrder)
Sets the order to newOrder . |
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 |
---|
public EquatorialArcSortKey()
Method Detail |
---|
public void setOrder(SortOrder newOrder)
Orderable
newOrder
.
Implementing classes should handle a null parameter in some way
other than merely saving it and waiting for a downstream
NullPointerException
. Typical responses would be to replace
null with some valid value, such as SortOrder.NATURAL
,
or to throw an IllegalArgumentException
.
setOrder
in interface Orderable
newOrder
- the new order for sorting.public SortOrder getOrder()
Orderable
Implementing classes should guarantee that the returned value will never be null.
getOrder
in interface Orderable
public int compare(A a1, A a2)
compare
in interface Comparator<A extends EquatorialArc<A>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |