Class ParameterTypeBoolean

  • All Implemented Interfaces:
    java.io.Serializable, Identifiable

    public class ParameterTypeBoolean
    extends ParameterType<java.lang.Boolean>
    implements java.io.Serializable
    Wrapper class for boolean parameters.

    Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OpenTrafficSim License.

    Version:
    $Revision$, $LastChangedDate$, by $Author$, initial version Apr 13, 2016
    Author:
    Alexander Verbraeck, Wouter Schakel
    See Also:
    Serialized Form
    • Constructor Detail

      • ParameterTypeBoolean

        public ParameterTypeBoolean​(java.lang.String id,
                                    java.lang.String description)
        Construct a new ParameterTypeBoolean without default value.
        Parameters:
        id - String; short name of the new ParameterTypeBoolean
        description - String; parameter description or full name of the new ParameterTypeBoolean
      • ParameterTypeBoolean

        public ParameterTypeBoolean​(java.lang.String id,
                                    java.lang.String description,
                                    boolean defaultValue)
        Construct a new ParameterTypeBoolean with default value.
        Parameters:
        id - String; short name of the new ParameterTypeBoolean
        description - String; parameter description or full name of the new ParameterTypeBoolean
        defaultValue - boolean; the default value of the new ParameterTypeBoolean
    • Method Detail

      • printValue

        public final java.lang.String printValue​(Parameters parameters)
                                          throws ParameterException
        Print the given value from the map in Parameters in a presentable format. The default implementation simply returns the output of toString().
        Overrides:
        printValue in class ParameterType<java.lang.Boolean>
        Parameters:
        parameters - Parameters; Parameters to get the value from
        Returns:
        String; readable representation of the value
        Throws:
        ParameterException - If the parameter is not present
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class ParameterType<java.lang.Boolean>