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 void
addDependentParameters(BooleanParameter[] booleanParameters)
Boolean
getBoolean()
Returns the value of this parameter as aBoolean
.BooleanParameter[]
getDependentParameters()
String
getScenarioCommand()
Collection<String>
getScenarioImports()
Object
getValue()
Returns the value of this parameter.boolean
isValid()
Returnstrue
, if the current value is valid.void
setValue(Object value)
Sets the value of theAttributeParameter
.String
toXMLString()
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:
setValue
in interfaceDisplayable
- Overrides:
setValue
in classAbstractSingleParameter
- Parameters:
value
- the new value of theAttributeParameter
.- Throws:
IllegalArgumentException
- thrown ifvalue
is not of the correct type.
-
getValue
Returns the value of this parameter.- Specified by:
getValue
in interfaceDisplayable
- Overrides:
getValue
in classAbstractSingleParameter
- Returns:
- the value of this parameter.
-
toXMLString
Description copied from interface:Displayable
Returns 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:
toXMLString
in interfaceDisplayable
- Overrides:
toXMLString
in classAbstractSingleParameter
- Returns:
- string holding an XML representation of this Displayable
- See Also:
Displayable.toXMLString()
-
getScenarioCommand
- Specified by:
getScenarioCommand
in interfaceProvidesScenarioSupportCommand
-
getScenarioImports
- Specified by:
getScenarioImports
in interfaceProvidesScenarioSupportCommand
-
addDependentParameters
- Parameters:
booleanParameters
-
-
getDependentParameters
-