Package io.dropwizard.jersey.params
Class NonEmptyStringParam
java.lang.Object
io.dropwizard.jersey.params.AbstractParam<Optional<String>>
io.dropwizard.jersey.params.NonEmptyStringParam
A parameter encapsulating optional string values with the condition that empty string inputs are
interpreted as being absent. This class is useful when it is desired for empty parameters to be
synonymous with absent parameters instead of empty parameters evaluating to
Optional.of("").-
Constructor Summary
ConstructorsConstructorDescriptionNonEmptyStringParam(@Nullable String input) NonEmptyStringParam(@Nullable String input, String parameterName) -
Method Summary
Methods inherited from class io.dropwizard.jersey.params.AbstractParam
equals, error, errorMessage, generateErrorMessage, get, getErrorStatus, hashCode, mediaType, toString
-
Constructor Details
-
NonEmptyStringParam
-
NonEmptyStringParam
-
-
Method Details
-
parse
Description copied from class:AbstractParamGiven a string representation, parse it and return an instance of the parameter type.- Specified by:
parsein classAbstractParam<Optional<String>>- Parameters:
input- the raw input- Returns:
input, parsed as an instance ofT
-