Class BooleanParam


  • @Deprecated
    public class BooleanParam
    extends AbstractParam<Boolean>
    Deprecated.
    As of release 2.0.0, will be removed in 3.0.0. Please use Optional instead.
    A parameter encapsulating boolean values. If the query parameter value is "true", regardless of case, the returned value is Boolean.TRUE. If the query parameter value is "false", regardless of case, the returned value is Boolean.FALSE. All other values will return a 400 Bad Request response.
    • Constructor Detail

      • BooleanParam

        public BooleanParam​(@Nullable
                            String input)
        Deprecated.
      • BooleanParam

        public BooleanParam​(@Nullable
                            String input,
                            String parameterName)
        Deprecated.
    • Method Detail

      • errorMessage

        protected String errorMessage​(Exception e)
        Deprecated.
        Description copied from class: AbstractParam
        Given a string representation which was unable to be parsed and the exception thrown, produce an entity to be sent to the client.
        Overrides:
        errorMessage in class AbstractParam<Boolean>
        Parameters:
        e - the exception thrown while parsing input
        Returns:
        the error message to be sent the client
      • parse

        protected Boolean parse​(@Nullable
                                String input)
                         throws Exception
        Deprecated.
        Description copied from class: AbstractParam
        Given a string representation, parse it and return an instance of the parameter type.
        Specified by:
        parse in class AbstractParam<Boolean>
        Parameters:
        input - the raw input
        Returns:
        input, parsed as an instance of T
        Throws:
        Exception - if there is an error parsing the input