- All Implemented Interfaces:
Parameter
- Direct Known Subclasses:
GenericCookieParameter
Generic Parameter implementation.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final StringThe parameter name.protected final ObjectConverter<String>The parameter value converter.protected final StringThe parameter value. -
Constructor Summary
ConstructorsConstructorDescriptionGenericParameter(String name, String value, ObjectConverter<String> parameterConverter) Creates a generic parameter with the specified parameter name, parameter value and parameter value converter. -
Method Summary
Modifier and TypeMethodDescription<T> TConverts the parameter value to the specified type.<T> TConverts the parameter value to the specified type.<T> T[]Converts the parameter value to an array of the specified type.<T> T[]Converts the parameter value to an array of the specified type.Converts the parameter value to a big decimal.Converts the parameter value to a big integer.Converts the parameter value to a boolean.asByte()Converts the parameter value to a byte.Converts the parameter value to a character.Class<?>asClass()Converts the parameter value to a class.Converts the parameter value to a currency.asDouble()Converts the parameter value to a double.asFile()Converts the parameter value to a file.asFloat()Converts the parameter value to a float.Converts the parameter value to an inet address.Converts the parameter value to an integer.<T> List<T>Converts the parameter value to a list of the specified type.<T> List<T>Converts the parameter value to a list of the specified type.Converts the parameter value to a local date.Converts the parameter value to a loca date time.asLocale()Converts the parameter value to a locale.asLong()Converts the parameter value to a long.asPath()Converts the parameter value to a path.Converts the parameter value to a pattern.<T> Set<T>Converts the parameter value to a set of the specified type.<T> Set<T>Converts the parameter value to a set of the specified type.asShort()Converts the parameter value to a short.asString()Converts the parameter value to a string.asURI()Converts the parameter value to a URI.asURL()Converts the parameter value to a URL.Converts the parameter value to a zoned date time.booleangetName()Returns the parameter name.getValue()Returns the parameter raw value.inthashCode()
-
Field Details
-
parameterConverter
The parameter value converter. -
name
The parameter name. -
value
The parameter value.
-
-
Constructor Details
-
GenericParameter
Creates a generic parameter with the specified parameter name, parameter value and parameter value converter.
- Parameters:
name- a parameter namevalue- a parameter valueparameterConverter- a string object converter
-
-
Method Details
-
getName
Description copied from interface:ParameterReturns the parameter name.
-
getValue
Description copied from interface:ParameterReturns the parameter raw value.
-
as
Description copied from interface:ParameterConverts the parameter value to the specified type.
-
as
Description copied from interface:ParameterConverts the parameter value to the specified type.
-
asArrayOf
Description copied from interface:ParameterConverts the parameter value to an array of the specified type.
-
asArrayOf
Description copied from interface:ParameterConverts the parameter value to an array of the specified type.
-
asListOf
Description copied from interface:ParameterConverts the parameter value to a list of the specified type.
-
asListOf
Description copied from interface:ParameterConverts the parameter value to a list of the specified type.
-
asSetOf
Description copied from interface:ParameterConverts the parameter value to a set of the specified type.
-
asSetOf
Description copied from interface:ParameterConverts the parameter value to a set of the specified type.
-
asByte
Description copied from interface:ParameterConverts the parameter value to a byte.
-
asShort
Description copied from interface:ParameterConverts the parameter value to a short.
-
asInteger
Description copied from interface:ParameterConverts the parameter value to an integer.
-
asLong
Description copied from interface:ParameterConverts the parameter value to a long.
-
asFloat
Description copied from interface:ParameterConverts the parameter value to a float.
-
asDouble
Description copied from interface:ParameterConverts the parameter value to a double.
-
asCharacter
Description copied from interface:ParameterConverts the parameter value to a character.
- Specified by:
asCharacterin interfaceParameter- Returns:
- the converted parameter value or null
-
asString
Description copied from interface:ParameterConverts the parameter value to a string.
-
asBoolean
Description copied from interface:ParameterConverts the parameter value to a boolean.
-
asBigInteger
Description copied from interface:ParameterConverts the parameter value to a big integer.
- Specified by:
asBigIntegerin interfaceParameter- Returns:
- the converted parameter value or null
-
asBigDecimal
Description copied from interface:ParameterConverts the parameter value to a big decimal.
- Specified by:
asBigDecimalin interfaceParameter- Returns:
- the converted parameter value or null
-
asLocalDate
Description copied from interface:ParameterConverts the parameter value to a local date.
- Specified by:
asLocalDatein interfaceParameter- Returns:
- the converted parameter value or null
-
asLocalDateTime
Description copied from interface:ParameterConverts the parameter value to a loca date time.
- Specified by:
asLocalDateTimein interfaceParameter- Returns:
- the converted parameter value or null
-
asZonedDateTime
Description copied from interface:ParameterConverts the parameter value to a zoned date time.
- Specified by:
asZonedDateTimein interfaceParameter- Returns:
- the converted parameter value or null
-
asCurrency
Description copied from interface:ParameterConverts the parameter value to a currency.
- Specified by:
asCurrencyin interfaceParameter- Returns:
- the converted parameter value or null
-
asLocale
Description copied from interface:ParameterConverts the parameter value to a locale.
-
asFile
Description copied from interface:ParameterConverts the parameter value to a file.
-
asPath
Description copied from interface:ParameterConverts the parameter value to a path.
-
asURI
Description copied from interface:ParameterConverts the parameter value to a URI.
-
asURL
Description copied from interface:ParameterConverts the parameter value to a URL.
-
asPattern
Description copied from interface:ParameterConverts the parameter value to a pattern.
-
asInetAddress
Description copied from interface:ParameterConverts the parameter value to an inet address.
- Specified by:
asInetAddressin interfaceParameter- Returns:
- the converted parameter value or null
-
asClass
Description copied from interface:ParameterConverts the parameter value to a class.
-
hashCode
public int hashCode() -
equals
-