|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.model.source.sort.SourceProximitySortKey
public class SourceProximitySortKey
Compares sources
based on their proximity to a given point
in the sky.
Version Info:
$Revision: 1617 $ |
$Date: 2008-10-10 16:52:33 -0600 (Fri, 10 Oct 2008) $ |
$Author: dharland $ (last person to modify) |
Field Summary | |
---|---|
static Date |
NOW
Tells this key to get position information as of the current system time. |
Constructor Summary | |
---|---|
SourceProximitySortKey()
Creates a new key for sorting sources by their proximity to a particular sky position. |
Method Summary | |
---|---|
int |
compare(SourceCatalogEntry sce1,
SourceCatalogEntry sce2)
|
SortOrder |
getOrder()
|
double |
getSeparationInDegrees(SourceCatalogEntry sce)
Returns the angular separation, in degrees, between sce
and the central position
of this object. |
void |
setCentralPosition(SkyPosition newPoint)
Sets the point in the sky from which all other sources will be measured. |
void |
setObserverParameters(EarthPosition location,
TimeZone timeZone)
Sets the earth position and time zone to be used in coordinate conversions. |
void |
setOrder(SortOrder newOrder)
|
void |
setQueryTime(Date newTime)
Sets the time for which position information will be requested. |
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 |
Field Detail |
---|
public static final Date NOW
Constructor Detail |
---|
public SourceProximitySortKey()
Method Detail |
---|
public double getSeparationInDegrees(SourceCatalogEntry sce)
sce
and the central position
of this object.
sce
- a celestial source.
source
and this object's
central sky position.public void setCentralPosition(SkyPosition newPoint)
newPoint
- a point in the sky. Sources will be compared to each other based
on their angular distance from this point. A value of null
is not allowed.
IllegalArgumentException
- if newPoint
is null.public void setObserverParameters(EarthPosition location, TimeZone timeZone)
location
- the location of the observer to be used in coordinate conversion
calculations. A value of null will result in the use of
the EVLA's position.timeZone
- the time zone of the observer to be used in coordinate conversion
calculations. A value of null will result in the use of
the EVLA's position.public void setQueryTime(Date newTime)
NOW
may be used as a signal to use the
current system time.
newTime
- the time at which position information will be evaluated.public void setOrder(SortOrder newOrder)
setOrder
in interface Orderable
public SortOrder getOrder()
getOrder
in interface Orderable
public int compare(SourceCatalogEntry sce1, SourceCatalogEntry sce2)
compare
in interface Comparator<SourceCatalogEntry>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |