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 Details

    • BooleanParameter

      public BooleanParameter​(Boolean value, String name, String description)
      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

      public BooleanParameter​(boolean value, String name, String description)
      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

      public Boolean getBoolean()
      Returns the value of this parameter as a Boolean.
      Returns:
      the value of this parameter as a Boolean.
    • isValid

      public boolean isValid()
      Returns true, if the current value is valid.
      Returns:
      DOCUMENT ME!
    • setValue

      public void setValue​(Object value)
      Sets the value of the AttributeParameter.
      Specified by:
      setValue in interface Displayable
      Overrides:
      setValue in class AbstractSingleParameter
      Parameters:
      value - the new value of the AttributeParameter.
      Throws:
      IllegalArgumentException - thrown if value is not of the correct type.
    • getValue

      public Object getValue()
      Returns the value of this parameter.
      Specified by:
      getValue in interface Displayable
      Overrides:
      getValue in class AbstractSingleParameter
      Returns:
      the value of this parameter.
    • toXMLString

      public String 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 interface Displayable
      Overrides:
      toXMLString in class AbstractSingleParameter
      Returns:
      string holding an XML representation of this Displayable
      See Also:
      Displayable.toXMLString()
    • getScenarioCommand

      public String getScenarioCommand()
      Specified by:
      getScenarioCommand in interface ProvidesScenarioSupportCommand
    • getScenarioImports

      public Collection<String> getScenarioImports()
      Specified by:
      getScenarioImports in interface ProvidesScenarioSupportCommand
    • addDependentParameters

      public void addDependentParameters​(BooleanParameter[] booleanParameters)
      Parameters:
      booleanParameters -
    • getDependentParameters

      public BooleanParameter[] getDependentParameters()