Package ch.epfl.cs107.play.signal.logic
Interface Logic
- All Superinterfaces:
Signal
- All Known Implementing Classes:
And,LogicGate,LogicNumber,MultipleAnd,Nand,Not,Or,Xor
Extension of signals to Logic signals
The signal may be TRUE or FALSE
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault floatdefault floatgetIntensity(float t) Intensity getter for given timebooleanisOff()booleanisOn()
-
Field Details
-
TRUE
-
FALSE
-
-
Method Details
-
isOn
boolean isOn()- Returns:
- (boolean): true if the signal is considered as on
-
isOff
boolean isOff()- Returns:
- (boolean): true if the signal is considered as off
-
getIntensity
default float getIntensity()- Returns:
- (float) : the signal intensity, usually 0.0 or 1.0
-
getIntensity
default float getIntensity(float t) Description copied from interface:SignalIntensity getter for given time- Specified by:
getIntensityin interfaceSignal- Parameters:
t- (float): the time at which we want the intensity- Returns:
- (float): signal intensity, usually between 0.0 and 1.0
-