Class HttpParameter

Represents an HTTP parameter.

Property Summary 

PropertyDescription
booleanValue: Boolean (read-only)Returns the value of the current HttpParameter attribute as a boolean.
dateValue: Date (read-only)Returns the value of the current HttpParameter attribute as a date.
doubleValue: Number (read-only)Returns the value of the current HttpParameter attribute as a number.
empty: Boolean (read-only)Identifies if there is a value for the http parameter attribute and whether the value is empty.
intValue: Number (read-only)Returns the value of the current HttpParameter attribute as int.
rawValue: String (read-only)Returns the raw value for this HttpParameter instance.
rawValues: Collection (read-only)Returns a Collection of all raw values for this HTTP parameter.
stringValue: String (read-only)Returns the value of the current HttpParameter attribute.
stringValues: Collection (read-only)Returns a Collection of all defined values for this HTTP parameter.
submitted: Boolean (read-only)Identifies if the parameter was submitted.
value: String (read-only)Returns the value of the current HttpParameter attribute.
values: Collection (read-only)Returns a Collection of all defined values for this current HTTP parameter.

Constructor Summary 

This class does not have a constructor, so you cannot create it directly.

Method Summary 

MethodDescription
containsStringValue(String)Identifies if the given value is part of the actual values.
getBooleanValue()Returns the value of the current HttpParameter attribute as a boolean.
getBooleanValue(Boolean)Returns the value of the current HttpParameter attribute as a boolean.
getDateValue()Returns the value of the current HttpParameter attribute as a date.
getDateValue(Date)Returns the value of the current HttpParameter attribute as a date.
getDoubleValue()Returns the value of the current HttpParameter attribute as a number.
getDoubleValue(Number)Returns the value of the current HttpParameter attribute as a number.
getIntValue()Returns the value of the current HttpParameter attribute as int.
getIntValue(Number)Returns the value of the current HttpParameter attribute as an integer.
getRawValue()Returns the raw value for this HttpParameter instance.
getRawValues()Returns a Collection of all raw values for this HTTP parameter.
getStringValue()Returns the value of the current HttpParameter attribute.
getStringValue(String)Returns the value of the current HttpParameter attribute.
getStringValues()Returns a Collection of all defined values for this HTTP parameter.
getValue()Returns the value of the current HttpParameter attribute.
getValues()Returns a Collection of all defined values for this current HTTP parameter.
isChecked(String)Identifies if the given String is an actual value of this http parameter.
isEmpty()Identifies if there is a value for the http parameter attribute and whether the value is empty.
isSubmitted()Identifies if the parameter was submitted.
toString()Returns the value of the current HttpParameter attribute.

Methods inherited from class Object 

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

Property Details 

booleanValue 

booleanValue: Boolean (read-only)

Returns the value of the current HttpParameter attribute as a boolean. If there is more than one value defined, only the first one is returned. For an undefined attribute it returns null.


dateValue 

dateValue: Date (read-only)

Returns the value of the current HttpParameter attribute as a date. If there is more than one value defined, only the first one is returned. For an undefined attribute and if attribute is not a date it return null.


doubleValue 

doubleValue: Number (read-only)

Returns the value of the current HttpParameter attribute as a number. If there is more than one value defined, only the first one is returned. For an undefined attribute it returns 0.0.


empty 

empty: Boolean (read-only)

Identifies if there is a value for the http parameter attribute and whether the value is empty. A value is treated as empty if it's not blank.


intValue 

intValue: Number (read-only)

Returns the value of the current HttpParameter attribute as int. If there is more than one value defined, only the first one is returned. For an undefined attribute it returns null.


rawValue 

rawValue: String (read-only)

Returns the raw value for this HttpParameter instance. The raw value is the not trimmed String value of this HTTP parameter. If there is more than one value defined, only the first one is returned. For an undefined attribute the method returns a null.

See Also:


rawValues 

rawValues: Collection (read-only)

Returns a Collection of all raw values for this HTTP parameter. The raw value is the not trimmed String value of this HTTP parameter.

See Also:


stringValue 

stringValue: String (read-only)

Returns the value of the current HttpParameter attribute. If there is more than one value defined, only the first one is returned. For an undefined attribute the method returns a null.


stringValues 

stringValues: Collection (read-only)

Returns a Collection of all defined values for this HTTP parameter.


submitted 

submitted: Boolean (read-only)

Identifies if the parameter was submitted. This is equivalent to the check, whether the parameter has a value.


value 

value: String (read-only)

Returns the value of the current HttpParameter attribute. If there is more than one value defined, only the first one is returned. For an undefined attribute the method returns null.


values 

values: Collection (read-only)

Returns a Collection of all defined values for this current HTTP parameter.

See Also:


Method Details 

containsStringValue(String) 

containsStringValue(value: String): Boolean

Identifies if the given value is part of the actual values.

Parameters:

  • value - the value to check.

Returns:

  • true if the value is among the actual values, false otherwise.

getBooleanValue() 

getBooleanValue(): Boolean

Returns the value of the current HttpParameter attribute as a boolean. If there is more than one value defined, only the first one is returned. For an undefined attribute it returns null.

Returns:

  • the actual value as a boolean or null of no value is available.

getBooleanValue(Boolean) 

getBooleanValue(defaultValue: Boolean): Boolean

Returns the value of the current HttpParameter attribute as a boolean. If there is more than one value defined, only the first one is returned. For an undefined attribute it returns the given default value.

Parameters:

  • defaultValue - the default value to use.

Returns:

  • the value of the parameter or the default value if empty.

getDateValue() 

getDateValue(): Date

Returns the value of the current HttpParameter attribute as a date. If there is more than one value defined, only the first one is returned. For an undefined attribute and if attribute is not a date it return null.

Returns:

  • the actual value as date or null if empty.

getDateValue(Date) 

getDateValue(defaultValue: Date): Date

Returns the value of the current HttpParameter attribute as a date. If there is more than one value defined, only the first one is returned. For an undefined attribute it returns the given default value and if the attributes is not a date it returns null.

Parameters:

  • defaultValue - the default value to use.

Returns:

  • the data value of the attribute or the default value if empty

getDoubleValue() 

getDoubleValue(): Number

Returns the value of the current HttpParameter attribute as a number. If there is more than one value defined, only the first one is returned. For an undefined attribute it returns 0.0.

Returns:

  • the actual value as double or null if the parameter has no value.

getDoubleValue(Number) 

getDoubleValue(defaultValue: Number): Number

Returns the value of the current HttpParameter attribute as a number. If there is more than one value defined, only the first one is returned. For an undefined attribute it returns the given default value.

Parameters:

  • defaultValue - the default value to use.

Returns:

  • the actual value as double or the default value if empty.

getIntValue() 

getIntValue(): Number

Returns the value of the current HttpParameter attribute as int. If there is more than one value defined, only the first one is returned. For an undefined attribute it returns null.

Returns:

  • the actual value as an integer or null of no value is available.

getIntValue(Number) 

getIntValue(defaultValue: Number): Number

Returns the value of the current HttpParameter attribute as an integer. If there is more than one value defined, only the first one is returned. For an undefined attribute it returns the given default value.

Parameters:

  • defaultValue - the default value to use.

Returns:

  • the value of the parameter or the default value if empty.

getRawValue() 

getRawValue(): String

Returns the raw value for this HttpParameter instance. The raw value is the not trimmed String value of this HTTP parameter. If there is more than one value defined, only the first one is returned. For an undefined attribute the method returns a null.

Returns:

  • the actual value or null.

See Also:


getRawValues() 

getRawValues(): Collection

Returns a Collection of all raw values for this HTTP parameter. The raw value is the not trimmed String value of this HTTP parameter.

Returns:

  • the raw values as a Collection of String, might be empty

See Also:


getStringValue() 

getStringValue(): String

Returns the value of the current HttpParameter attribute. If there is more than one value defined, only the first one is returned. For an undefined attribute the method returns a null.

Returns:

  • the actual value or null.

getStringValue(String) 

getStringValue(defaultValue: String): String

Returns the value of the current HttpParameter attribute. If there is more than one value defined, only the first one is returned. For an undefined attribute the method returns the given default value.

Parameters:

  • defaultValue - the default value to use.

Returns:

  • the actual value or the default value.

getStringValues() 

getStringValues(): Collection

Returns a Collection of all defined values for this HTTP parameter.

Returns:

  • the actual values as Collection.

getValue() 

getValue(): String

Returns the value of the current HttpParameter attribute. If there is more than one value defined, only the first one is returned. For an undefined attribute the method returns null.

Returns:

  • the actual value or null.

getValues() 

getValues(): Collection

Returns a Collection of all defined values for this current HTTP parameter.

Returns:

  • the actual values as Collection.

See Also:


isChecked(String) 

isChecked(value: String): Boolean

Identifies if the given String is an actual value of this http parameter.

Parameters:

  • value - the value to check.

Returns:

  • true if the value is among the actual values, false otherwise.

isEmpty() 

isEmpty(): Boolean

Identifies if there is a value for the http parameter attribute and whether the value is empty. A value is treated as empty if it's not blank.

Returns:

  • true if a value is empty, false otherwise.

isSubmitted() 

isSubmitted(): Boolean

Identifies if the parameter was submitted. This is equivalent to the check, whether the parameter has a value.

Returns:

  • true if a value is there, false otherwise.

toString() 

toString(): String

Returns the value of the current HttpParameter attribute. If there is more than one value defined, only the first one is returned. For an undefined attribute the method returns an empty string.

Returns:

  • the actual value or an empty String.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!