public static final class MotionDone.Builder extends Object
MotionsDone. Allows you to specify the required
components one a a time before calling build(). The other methods each
return this in order to allow chaining. Hall transitions and encoder samples
may be added in any order since the complete list of each will be sorted
before constructing the instance of MotionDone.
Not thread-safe at all, as it's intended as a substitute for a public constructor.
| Constructor and Description |
|---|
Builder()
Use this constructor for normal purposes.
|
Builder(boolean noThrow)
Use this constructor only when you need to construct faulty instances
of
MotionDone for tests. |
public Builder()
public Builder(boolean noThrow)
MotionDone for tests.noThrow - If true then failed checks will throw exceptions, otherwise
they will log warning messages.public MotionDone.Builder side(ShutterSide side)
side - thisMotionDone.side()public MotionDone.Builder startPosition(double pos)
pos - MotionDone.startPosition()public MotionDone.Builder startTime(org.lsst.ccs.utilities.taitime.CCSTimeStamp time)
time - thisMotionDone.startTime()public MotionDone.Builder targetPosition(double pos)
pos - thisMotionDone.targetPosition()public MotionDone.Builder endPosition(double pos)
pos - thisMotionDone.endPosition()public MotionDone.Builder targetDuration(Duration dur)
dur - thisIllegalArgumentException - if the duration is non-positive, unless
the no-throwing was chosen in the constructor.MotionDone.targetDuration()public MotionDone.Builder actualDuration(Duration dur)
dur - thisIllegalArgumentException - if the duration is non-positive.MotionDone.actualDuration()public MotionDone.Builder encoderSamples(List<EncoderSample> samps)
samps - thisMotionDone.encoderSamples()public MotionDone.Builder addEncoderSample(EncoderSample samp)
samp - thisMotionDone.encoderSamples()public MotionDone.Builder hallTransitions(List<HallTransition> halls)
halls - thisMotionDone.hallTransitions()public MotionDone.Builder addHallTransition(HallTransition hall)
hall - thisMotionDone.hallTransitions()public MotionDone.Builder ptpState(PtpDeviceState state)
state - thisMotionDone.ptpState()public MotionDone.Builder leapSeconds(int seconds)
seconds - thisMotionDone.leapSeconds()public MotionDone.Builder leapIsValid(boolean valid)
valid - MotionDone.isLeapValid()public MotionDone build()
MotionDone.MotionDone.IllegalStateException - if any of the required components are missing, unless
no-throwing was selected in the constructor.Copyright © 2024 LSST. All rights reserved.