Class ParameterTypeInteger

    • Constructor Detail

      • ParameterTypeInteger

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

        public ParameterTypeInteger​(String id,
                                    String description,
                                    int defaultValue)
        Construct a new ParameterTypeInteger with default value, without check.
        Parameters:
        id - String; short name of the new ParameterTypeInteger
        description - String; parameter description or full name of the new ParameterTypeInteger
        defaultValue - int; the default value of the new ParameterTypeInteger
      • ParameterTypeInteger

        public ParameterTypeInteger​(String id,
                                    String description,
                                    Integer defaultValue)
        Construct a new ParameterTypeInteger with default value, without check.
        Parameters:
        id - String; short name of the new ParameterTypeInteger
        description - String; parameter description or full name of the new ParameterTypeInteger
        defaultValue - Integer; the default value of the new ParameterTypeInteger
      • ParameterTypeInteger

        public ParameterTypeInteger​(String id,
                                    String description,
                                    Constraint<? super Integer> constraint)
        Construct a new ParameterTypeInteger without default value, with check.
        Parameters:
        id - String; short name of the new ParameterTypeInteger
        description - String; parameter description or full name of the new ParameterTypeInteger
        constraint - Constraint<? super Integer>; constraint for parameter values
      • ParameterTypeInteger

        public ParameterTypeInteger​(String id,
                                    String description,
                                    int defaultValue,
                                    Constraint<? super Integer> constraint)
        Construct a new ParameterTypeInteger with default value and check.
        Parameters:
        id - String; short name of the new ParameterTypeInteger
        description - String; parameter description or full name of the new ParameterTypeInteger
        defaultValue - int; the default value of the new ParameterTypeInteger
        constraint - Constraint<? super Integer>; constraint for parameter values
      • ParameterTypeInteger

        public ParameterTypeInteger​(String id,
                                    String description,
                                    Integer defaultValue,
                                    Constraint<Number> constraint)
        Construct a new ParameterTypeInteger with default value and check.
        Parameters:
        id - String; short name of the new ParameterTypeInteger
        description - String; parameter description or full name of the new ParameterTypeInteger
        defaultValue - Integer; the default value of the new ParameterTypeInteger
        constraint - Constraint<Number>; constraint for parameter values
    • Method Detail

      • printValue

        public final 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 ParameterTypeNumeric<Integer>
        Parameters:
        parameters - Parameters; Parameters to get the value from
        Returns:
        String; readable representation of the value
        Throws:
        ParameterException - If the parameter is not present
      • check

        public void check​(int value,
                          Parameters params)
                   throws ParameterException
        Method to overwrite for checks with constraints.
        Parameters:
        value - int; Value to check with constraints.
        params - Parameters; Set of parameters.
        Throws:
        ParameterException - If the value does not comply with constraints.