Package org.graffiti.plugin.parameter
Class BooleanParameter
java.lang.Object
org.graffiti.plugin.parameter.AbstractSingleParameter
org.graffiti.plugin.parameter.BooleanParameter
- All Implemented Interfaces:
Displayable,Parameter,SingleParameter,ProvidesScenarioSupportCommand
public class BooleanParameter extends AbstractSingleParameter implements ProvidesScenarioSupportCommand
Parameter that contains a
Boolean value.- Version:
- $Revision: 1.9 $
-
Constructor Summary
Constructors Constructor Description BooleanParameter(boolean value, String name, String description)Constructs a new boolean parameter.BooleanParameter(Boolean value, String name, String description)Constructs a new boolean parameter. -
Method Summary
Modifier and Type Method Description voidaddDependentParameters(BooleanParameter[] booleanParameters)BooleangetBoolean()Returns the value of this parameter as aBoolean.BooleanParameter[]getDependentParameters()StringgetScenarioCommand()Collection<String>getScenarioImports()ObjectgetValue()Returns the value of this parameter.booleanisValid()Returnstrue, if the current value is valid.voidsetValue(Object value)Sets the value of theAttributeParameter.StringtoXMLString()Returns a well-formed XML string representing the Displayable.Methods inherited from class org.graffiti.plugin.parameter.AbstractSingleParameter
getDescription, getIcon, getImage, getName, isLeftAligned, setDescription, setLeftAligned, toString
-
Constructor Details
-
BooleanParameter
Constructs a new boolean parameter.- Parameters:
value- the new Boolean value. May be null.name- the name of the parameter.description- the description of the parameter.
-
BooleanParameter
Constructs a new boolean parameter.- Parameters:
value- the new boolean value..name- the name of the parameter.description- the description of the parameter.
-
-
Method Details
-
getBoolean
Returns the value of this parameter as aBoolean.- Returns:
- the value of this parameter as a
Boolean.
-
isValid
public boolean isValid()Returnstrue, if the current value is valid.- Returns:
- DOCUMENT ME!
-
setValue
Sets the value of theAttributeParameter.- Specified by:
setValuein interfaceDisplayable- Overrides:
setValuein classAbstractSingleParameter- Parameters:
value- the new value of theAttributeParameter.- Throws:
IllegalArgumentException- thrown ifvalueis not of the correct type.
-
getValue
Returns the value of this parameter.- Specified by:
getValuein interfaceDisplayable- Overrides:
getValuein classAbstractSingleParameter- Returns:
- the value of this parameter.
-
toXMLString
Description copied from interface:DisplayableReturns a well-formed XML string representing the Displayable. The Displayable should be reconstructable via this representation. Therefore it must at least include the type of Displayable (classname) and a representation of its value. PROBABLE FUTURE DESIGN: The Displayables themselves will provide a method to reconstruct their value from the XML representation they provided.- Specified by:
toXMLStringin interfaceDisplayable- Overrides:
toXMLStringin classAbstractSingleParameter- Returns:
- string holding an XML representation of this Displayable
- See Also:
Displayable.toXMLString()
-
getScenarioCommand
- Specified by:
getScenarioCommandin interfaceProvidesScenarioSupportCommand
-
getScenarioImports
- Specified by:
getScenarioImportsin interfaceProvidesScenarioSupportCommand
-
addDependentParameters
- Parameters:
booleanParameters-
-
getDependentParameters
-