Class URLArgument
- java.lang.Object
-
- me.s3ns3iw00.jcommands.argument.Argument<O>
-
- me.s3ns3iw00.jcommands.argument.InputArgument<java.lang.String,java.net.URL>
-
- me.s3ns3iw00.jcommands.argument.type.URLArgument
-
public class URLArgument extends InputArgument<java.lang.String,java.net.URL>
An argument that only acceptsString
input that is a valid URL (can be parsed toURL
)
-
-
Constructor Summary
Constructors Constructor Description URLArgument(java.lang.String name, java.lang.String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArgumentValidation<java.lang.String>
whenInvalidUrl()
Returns the validation to be able to set the response that will be sent when the input is not valid for the regex-
Methods inherited from class me.s3ns3iw00.jcommands.argument.InputArgument
convertResult, getArgumentValidator, getCommandOption, getResultConverter, getResultType, isOptional, setOptional
-
Methods inherited from class me.s3ns3iw00.jcommands.argument.Argument
getDescription, getMismatchListener, getName, getType, setOnMismatch
-
-
-
-
Method Detail
-
whenInvalidUrl
public ArgumentValidation<java.lang.String> whenInvalidUrl()
Returns the validation to be able to set the response that will be sent when the input is not valid for the regex- Returns:
- the existing validation
-
-