|
||||||||||
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.ScanLoopElement edu.nrao.sss.model.project.scan.Scan edu.nrao.sss.model.project.scan.FocusScan
public class FocusScan
A scan that holds a list of focus offsets
.
Version Info:
$Revision: 1314 $ |
$Date: 2008-05-30 11:31:14 -0600 (Fri, 30 May 2008) $ |
$Author: dharland $ |
Field Summary |
---|
Fields inherited from class edu.nrao.sss.model.project.scan.Scan |
---|
DEFAULT_NAME |
Fields inherited from interface edu.nrao.sss.util.Identifiable |
---|
UNIDENTIFIED |
Fields inherited from interface edu.nrao.sss.model.UserAccountable |
---|
NULL_USER_ID |
Method Summary | |
---|---|
void |
addOffsets(Distance minimumOffset,
Distance maximumOffset,
int numberOfOffsets,
TimeDuration timeAtOffset)
Adds a series of offsets to this scan's list. |
void |
addOffsets(int numberOfPositiveOffsets,
Distance incrementalOffset,
TimeDuration timeAtOffset)
Adds a series of offsets to this scan's list. |
FocusScan |
clone()
Returns a focus scan that is a copy of this one. |
boolean |
equals(Object o)
Returns true if o is equal to this focus scan. |
List<FocusOffset> |
getOffsets()
Returns the list of focus offsets held by this scan. |
int |
hashCode()
Returns a hash code value for this scan loop element. |
void |
setOffsets(List<FocusOffset> replacementList)
Sets the list of focus offsets held by this scan. |
List<FocusOffset> |
sortOffsets()
Sorts the internal list of offsets and returns it. |
String |
toSummaryString()
Returns a short textual description of this scan loop element. |
Methods inherited from class edu.nrao.sss.model.project.scan.ScanLoopElement |
---|
appendComments, getComments, getCreatedBy, getCreatedOn, getId, getLastUpdatedBy, getLastUpdatedOn, getName, getProgramBlock, getProject, getSchedulingBlock, hasSchedulingBlock, setComments, setCreatedBy, setCreatedOn, setId, setLastUpdatedBy, setLastUpdatedOn, setName, setSchedulingBlock, toString, toXml, writeAsXmlTo |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void setOffsets(List<FocusOffset> replacementList)
replacementList
will be interpreted
as a new empty list.
This scan will hold a reference to replacementList
(unless it is null), so any changes made to the list
after calling this method will be reflected in this object.
replacementList
- a list of focus offsets to be held by this
scan.public List<FocusOffset> getOffsets()
The returned list is the actual list held by this scan, so changes made to the list will be reflected in this object.
public List<FocusOffset> sortOffsets()
The returned list is the actual list held by this scan, so changes made to the list will be reflected in this object.
public void addOffsets(int numberOfPositiveOffsets, Distance incrementalOffset, TimeDuration timeAtOffset)
-nd,...,-2d,-d,0,+d,+2d,...,+nd.
numberOfPositiveOffsets
- the number of positive offsets to be added. The total number of offsets
added is equal to one plus two times this amount. An IllegalArgumentException
will be thrown if this value is negative.incrementalOffset
- the spacing between the offsets added by this method. This value is
typically in millimeters. An IllegalArgumentException
will be
thrown if this value less than or equal to zero.timeAtOffset
- the amount of time the focus should be placed at this offset.
IllegalArgumentException
- if any of the parameters violate the rules listed above.public void addOffsets(Distance minimumOffset, Distance maximumOffset, int numberOfOffsets, TimeDuration timeAtOffset)
numberOfOffsets
.
The smallest new offset is minimumOffset
, the largest is
maximumOffset
. The other offsets are spread evenly between
these two endpoints.
minimumOffset
- the smallest focus offset. This value is often negative.maximumOffset
- the largest focus offset. An IllegalArgumentException
will be
thrown if this value is less than or equal to the minimumOffset
.numberOfOffsets
- the number of new offsets to be added.
Special cases:minimumOffset
will be added.minimumOffset
and maximumOffset
will be added.timeAtOffset
- the amount of time the focus should be placed at this offset.
IllegalArgumentException
- if any of the parameters violate the rules listed above.public String toSummaryString()
ScanLoopElement
toSummaryString
in class Scan
public FocusScan clone()
The returned scan is, for the most part, a deep copy of this one.
However, there are a few exceptions noted in the
clone method
of this class's parent.
If anything goes wrong during the cloning procedure,
a RuntimeException
will be thrown.
clone
in class Scan
public boolean equals(Object o)
o
is equal to this focus scan.
In order for o
to be equal to this scan, it must have
equal focus offsets in the same order as those of this scan.
It must also follow the rules set forth in the
equals method
of this class's parent.
equals
in class Scan
public int hashCode()
ScanLoopElement
hashCode
in class Scan
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |