T - The underlying type of the signalR - The resulting signal type that will be built by this builderpublic abstract class AbstractScriptedDiscreteValueBuilder<T,R> extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractScriptedDiscreteValueBuilder()
Creates a signal builder with no initial value.
|
protected |
AbstractScriptedDiscreteValueBuilder(T initialValue)
Creates a signal builder with an initial value at
MoxieTime.getMinValue(). |
| Modifier and Type | Method and Description |
|---|---|
AbstractScriptedDiscreteValueBuilder<T,R> |
add(MoxieTime momentOfChange,
T newValue)
Add a change to the script.
|
R |
build()
Builds a final result from the collected script.
|
protected abstract R |
buildFinalResult(NavigableMap<MoxieTime,T> script)
Overridden by subclasses to build the final result value.
|
protected AbstractScriptedDiscreteValueBuilder()
protected AbstractScriptedDiscreteValueBuilder(T initialValue)
MoxieTime.getMinValue().initialValue - The initial value.protected abstract R buildFinalResult(NavigableMap<MoxieTime,T> script)
script - The script of values and their change times.public final R build()
public final AbstractScriptedDiscreteValueBuilder<T,R> add(@NotNull MoxieTime momentOfChange, T newValue)
momentOfChange - The moment of the change.newValue - The new value at momentOfChange.