public class BooleanParameterParser extends AbstractParameterParser
locale
Constructor and Description |
---|
BooleanParameterParser()
Default constructor.
|
BooleanParameterParser(Locale locale)
Constructs a new boolean parameter parser using the given locale.
|
Modifier and Type | Method and Description |
---|---|
String |
getTypeToken()
Returns the string which serves as a value type token for parameters of
this type.
|
Constraints |
parse(Properties db,
TokenTranslator tr,
ParserLoader parserLoader)
Creates as an instance of
BooleanConstraints . |
Serializable |
parse(String token,
Constraints constraints,
Parameters parameters)
Returns a non-null object if the parsing of the given token was
succesful and if the object value complied with the specified
constraints, if any were specified.
|
getLocale
public BooleanParameterParser()
public BooleanParameterParser(Locale locale)
locale
- Locale to associate with this parser.public String getTypeToken()
TypedParser
TypedParser.getTypeToken()
public Constraints parse(Properties db, TokenTranslator tr, ParserLoader parserLoader)
BooleanConstraints
.db
- Set of properties that can be used to parametrize the
constraints implementation.tr
- A token translator that can be used for
locale-specific or other types of value translation.parserLoader
- Reference to the parameter and constraints parser loader.BooleanConstraints
instance created using the
specified properties.ConstraintsParser.parse(java.util.Properties, com.hp.util.format.TokenTranslator, com.hp.util.syntax.ParserLoader)
public Serializable parse(String token, Constraints constraints, Parameters parameters)
token
- String to be decoded/parsed into a Serializable entity.constraints
- Constraints & hints to use for parsing
and for validating the resulting Serializable.parameters
- Parameters accumulated by the parsing process thus far.ParameterParser.parse(java.lang.String, com.hp.util.syntax.parsers.Constraints, com.hp.util.syntax.Parameters)
Copyright © 2015. All Rights Reserved.