com.yobotics.simulationconstructionset
Class BooleanYoVariable
java.lang.Object
com.yobotics.simulationconstructionset.YoVariable
com.yobotics.simulationconstructionset.BooleanYoVariable
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- DelayedBooleanYoVariable, GlitchFilteredBooleanYoVariable
public class BooleanYoVariable
- extends YoVariable
- See Also:
- Serialized Form
Method Summary |
boolean |
getBooleanValue()
Retrieve the boolean value of this YoVariable, if not of boolean type a warning will be printed. |
void |
getValue(java.lang.StringBuffer stringBuffer)
Appends the value of this variable to the end of the given StringBuffer. |
double |
getValueAsDouble()
|
YoVariableType |
getYoVariableType()
|
void |
set(boolean value)
Sets the boolean value of this YoVariable. |
void |
setValueFromDouble(double value)
|
java.lang.String |
toString()
|
boolean |
valueEquals(boolean value)
Check if the value contained by this variable is equal to the given double. |
Methods inherited from class com.yobotics.simulationconstructionset.YoVariable |
addVariableChangedListener, fullNameEndsWith, getDescription, getFullNameWithNameSpace, getManualScalingMax, getManualScalingMin, getName, getName, getNameAndValue, getNameSpace, getNumericValueAsAString, getShortName, getVariableChangedListeners, getYoVariableRegistry, hasSameFullName, notifyVariableChangedListeners, removeAllVariableChangedListeners, removeVariableChangedListener, setManualScalingMinMax |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BooleanYoVariable
public BooleanYoVariable(java.lang.String name,
YoVariableRegistry registry)
BooleanYoVariable
public BooleanYoVariable(java.lang.String name,
java.lang.String description,
YoVariableRegistry registry)
valueEquals
public boolean valueEquals(boolean value)
- Check if the value contained by this variable is equal to the given double. If not of double type
a warning will be printed to the console.
- Parameters:
value
- boolean to be compared to
- Returns:
- are they equal?
getBooleanValue
public boolean getBooleanValue()
- Retrieve the boolean value of this YoVariable, if not of boolean type a warning will be printed.
- Returns:
- boolean value of this
set
public void set(boolean value)
- Sets the boolean value of this YoVariable. If not of boolean type a warning will be printed.
- Parameters:
value
- boolean
setValueFromDouble
public void setValueFromDouble(double value)
- Specified by:
setValueFromDouble
in class YoVariable
getValueAsDouble
public double getValueAsDouble()
- Specified by:
getValueAsDouble
in class YoVariable
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getValue
public void getValue(java.lang.StringBuffer stringBuffer)
- Appends the value of this variable to the end of the given StringBuffer. This representation is
based on variable type.
- Specified by:
getValue
in class YoVariable
- Parameters:
stringBuffer
- StringBuffer to which the value will be appended
getYoVariableType
public YoVariableType getYoVariableType()
- Specified by:
getYoVariableType
in class YoVariable