|
||||||||||
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.DelaySetting
public class DelaySetting
A setting used in a DelayScan
.
Version Info:
$Revision: 1494 $ |
$Date: 2008-08-14 13:51:17 -0600 (Thu, 14 Aug 2008) $ |
$Author: dharland $ (last person to modify) |
Constructor Summary | |
---|---|
DelaySetting()
Creates a new instance. |
Method Summary | |
---|---|
DelaySetting |
clone()
Returns a setting that is a copy of this one. |
int |
compareTo(DelaySetting other)
Compares this setting with other for order. |
boolean |
equals(Object o)
Returns true if o is equal to this setting. |
ScanTimeType |
getDurationType()
Returns the type of duration used by this setting. |
double |
getNanoseconds()
Returns the nanosecond delay used in 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. |
int |
hashCode()
Returns a hash code value for this setting. |
void |
setDurationType(ScanTimeType newType)
Sets a new duration type for this setting. |
void |
setNanoseconds(double ns)
Sets the nanosecond delay used in 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. |
String |
toString()
Returns a text representation of this delay setting. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DelaySetting()
Method Detail |
---|
public void setNanoseconds(double ns)
ns
- the nanosecond delay used in this setting.public double getNanoseconds()
setNanoseconds(double)
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 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 int compareTo(DelaySetting other)
other
for order.
If this setting has a smaller delay than the other's, a negative value is returned; if larger, a positive value is returned. If both settings have the delay, a negative value is returned if this setting has a smaller time duration than the other. The duration type is not used for figuring out which time duration is larger or smaller. If the durations are equal in magnitude, though, a comparison of durations will be used to break the tie, but only in order to stay consistent with equals().
compareTo
in interface Comparable<DelaySetting>
public DelaySetting 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 |