public class LinkedInput extends Object implements Input, ActivityDefObserver, Stoppable
| Constructor and Description |
|---|
LinkedInput(ActivityDef activityDef,
Input linkedInput) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canAdvance()
for testing
|
long |
getAsLong()
For the sake of efficiency, ActivityMotors that consume values from this interface should do a range check
after getting the value.
|
long |
getCurrent() |
long |
getInterval(long stride)
For the sake of efficiency, ActivityMotors that consume values from this interface
should do a range check after getting the value.
|
AtomicLong |
getMax() |
AtomicLong |
getMin() |
void |
onActivityDefUpdate(ActivityDef activityDef) |
void |
requestStop()
Ask this component to stop cycling.
|
public LinkedInput(ActivityDef activityDef, Input linkedInput)
public AtomicLong getMin()
public AtomicLong getMax()
public long getCurrent()
getCurrent in interface Inputpublic long getAsLong()
InputInput.getMax(), the motor should
take this as a signal to terminate gracefully with a log line indicating why.getAsLong in interface InputgetAsLong in interface LongSupplierpublic long getInterval(long stride)
InputgetMax, the motor should take this as a signal to terminate
gracefullly with a log line indicating why.getInterval in interface InputgetInterval in interface longIntervalSupplierstride - The width of the interval of numbers returnedprotected boolean canAdvance()
public void onActivityDefUpdate(ActivityDef activityDef)
onActivityDefUpdate in interface ActivityDefObserverpublic void requestStop()
StoppablerequestStop in interface StoppableCopyright © 2017. All rights reserved.