public abstract class BooleanSignalSourceChooser extends AbstractSignalSourceChooser implements BooleanSignalSource
boolean
that choose
dynamically from a fixed collection of inputs.Modifier and Type | Class and Description |
---|---|
(package private) static class |
BooleanSignalSourceChooser.OfEnum<E extends Enum<E>> |
(package private) static class |
BooleanSignalSourceChooser.OfEnumInt<E extends Enum<E>> |
(package private) static class |
BooleanSignalSourceChooser.OfInt |
Constructor and Description |
---|
BooleanSignalSourceChooser() |
Modifier and Type | Method and Description |
---|---|
protected abstract BooleanSignalSource |
choose()
Returns the chosen the input signal source for the current
value.
|
protected Consumer<CompilationContext> |
compileDefaultValue()
Returns a code generator for loading the default value of the signal type
on the operand stack.
|
boolean |
getAsBoolean()
Returns the current value of this signal source.
|
alwaysThrow, compileConvertToInt, compileDataFlow, compileOrDefault, getCases, getSelector
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
and, becoming, ceasing, choose, choose, choose, choose, choose, choose, choose, choose, choose, choose, choose, clock, compileDataFlow, compileMainSignalSource, constant, delayed, delayed, delayedFeedback, delayedFeedback, getConstantAsBoolean, getValueClass, guard, hasConstantAsBoolean, invariant, map, not, or, power, probe, publishStoredValueVariable, relateWith, sampleAndHold, stored, xor, zipWith
compileDataFlowTo, hasDataFlowIO
protected abstract BooleanSignalSource choose()
public boolean getAsBoolean()
The value may be either computed on demand, or retrieved from storage.
Implementations of this method should have no side effect.
getAsBoolean
in interface BooleanSignalSource
getAsBoolean
in interface BooleanSupplier
protected Consumer<CompilationContext> compileDefaultValue()
AbstractSignalSourceChooser
compileDefaultValue
in class AbstractSignalSourceChooser