Package google.registry.tools.params
Class OptionalParameterConverterValidator<T,C extends ParameterConverterValidator<T>>
java.lang.Object
google.registry.tools.params.ParameterConverterValidator<Optional<T>>
google.registry.tools.params.OptionalParameterConverterValidator<T,C>
- All Implemented Interfaces:
com.beust.jcommander.IParameterValidator
,com.beust.jcommander.IStringConverter<Optional<T>>
- Direct Known Subclasses:
OptionalIntervalParameter
,OptionalLongParameter
,OptionalPhoneNumberParameter
,OptionalStringParameter
public class OptionalParameterConverterValidator<T,C extends ParameterConverterValidator<T>>
extends ParameterConverterValidator<Optional<T>>
Class for parameters that can handle special string "null" or empty values to
indicate a desire to pass an empty value (i.e. when clearing out nullable
fields on a resource).
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
OptionalParameterConverterValidator
public OptionalParameterConverterValidator()
-
-
Method Details
-
validate
- Specified by:
validate
in interfacecom.beust.jcommander.IParameterValidator
- Overrides:
validate
in classParameterConverterValidator<Optional<T>>
-
convert
- Specified by:
convert
in interfacecom.beust.jcommander.IStringConverter<T>
- Specified by:
convert
in classParameterConverterValidator<Optional<T>>
-