|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.model.project.scan.SwitchSetting
public class SwitchSetting
A switch setting used by a SwitchingScan
.
Version Info:
$Revision: 2190 $ |
$Date: 2009-04-13 15:15:03 -0600 (Mon, 13 Apr 2009) $ |
$Author: dharland $ (last person to modify) |
Constructor Summary | |
---|---|
SwitchSetting()
Creates a new instance. |
Method Summary | |
---|---|
SwitchSetting |
clone()
Returns a setting that is a copy of this one. |
boolean |
equals(Object o)
Returns true if o is equal to this setting. |
ScanTimeType |
getDurationType()
Returns the type of duration used by this setting. |
Resource |
getResource()
Returns the resource to use for this scan, or null if one cannot be found. |
Source |
getSource()
Returns the source to use at the current time. |
Source |
getSource(Date dateTime)
Returns the source to use at the given time. |
SourceCatalogEntry |
getSourceCatalogEntry()
Returns either the Source or SourceLookupTable that is the
used for this setting. |
TimeDuration |
getTimeAtSetting()
Returns the amount of time that should be spent at this setting. |
ScanTimeSpecification |
getTimeSpec()
A convenience method for fetching the time spent at this setting. |
boolean |
getUseForAutophasing()
Returns true if the source in this setting should be used for autophasing. |
int |
hashCode()
Returns a hash code value for this setting. |
void |
setDurationType(ScanTimeType newType)
Sets a new duration type for this setting. |
void |
setResource(Resource newResource)
Sets the resource to be used for this scan. |
void |
setSourceCatalogEntry(SourceCatalogEntry sourceOrTable)
Sets either the Source or SourceLookupTable to use for this
setting. |
void |
setTimeAtSetting(TimeDuration duration)
Sets the amount of time that should be spent at this setting. |
void |
setTimeSpec(ScanTimeSpecification newSpec)
A convenience method for setting the time spent at this setting. |
void |
setUseForAutophasing(boolean use)
Determines whether or not the source in this switch setting should be used for autophasing. |
String |
toString()
Returns a text representation of this pointing position. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SwitchSetting()
Method Detail |
---|
public void setSourceCatalogEntry(SourceCatalogEntry sourceOrTable)
Source
or SourceLookupTable
to use for this
setting.
sourceOrTable
- the Source
or SourceLookupTable
to
use for this setting.public SourceCatalogEntry getSourceCatalogEntry()
Source
or SourceLookupTable
that is the
used for this setting. The returned value may be null.
Source
or SourceLookupTable
used for this scan,
or null if this setting has neither.public Source getSource()
public Source getSource(Date dateTime)
dateTime
- the time for which the source is needed.
public void setResource(Resource newResource)
newResource
- the resource to be used for this scan.public Resource getResource()
public void setTimeAtSetting(TimeDuration duration)
If duration
is null, it will be treated as
an non-null duration of size zero.
duration
- the amount of time that should be spent at this setting.public TimeDuration getTimeAtSetting()
The returned value is guaranteed to be non-null. It is also the duration that is held internally by this position, so any changes made to the returned duration will be reflected in this object.
public void setDurationType(ScanTimeType newType)
newType
- the new duration type for this setting.
If this value is null, the default duration type of
ON_SOURCE_SIDEREAL will be used.
This value must have its isDuration() method
return true. If it does not, an
IllegalArgumentException is thrown.
IllegalArgumentException
- if newType
is not a duration type.public ScanTimeType getDurationType()
getTimeAtSetting()
.
The returned type will be non-null and its isDuration() method will always return true.
public void setUseForAutophasing(boolean use)
use
- true if the source in this setting should be used
for autophasing.public boolean getUseForAutophasing()
public void setTimeSpec(ScanTimeSpecification newSpec)
getTimeType()
and
getDuration()
methods
to set the time at setting and duration type of this object.
newSpec
- the provider of the time at setting and duration type values for
this setting. A value of null will result in a
NullPointerException
.
IllegalArgumentException
- if the time type held by newSpec
is not a duration type.public ScanTimeSpecification getTimeSpec()
public String toString()
toString
in class Object
public SwitchSetting clone()
If anything goes wrong during the cloning procedure,
a RuntimeException
will be thrown.
clone
in class Object
public boolean equals(Object o)
o
is equal to this setting.
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |