new RequestParameter()
Request parameter holder
Methods
getArray() → {Array.<RequestParameter>}
Returns null if value is not a list, otherwise it returns value
Returns:
- Type
- Array.<RequestParameter>
getBoolean() → {boolean}
Returns null if value is not a Boolean, otherwise it returns value
Returns:
- Type
- boolean
getDouble() → {number}
Returns null if value is not a Double, otherwise it returns value
Returns:
- Type
- number
getFloat() → {number}
Returns null if value is not a Float, otherwise it returns value
Returns:
- Type
- number
getInteger() → {number}
Returns null if value is not an Integer, otherwise it returns value
Returns:
- Type
- number
getJsonArray() → {Array}
Returns null if value is not a JsonArray, otherwise it returns value
Returns:
- Type
- Array
getJsonObject() → {Object}
Returns null if value is not a JsonObject, otherwise it returns value
Returns:
- Type
- Object
getLong() → {number}
Returns null if value is not a Long, otherwise it returns value
Returns:
- Type
- number
getName() → {string}
Get parameter name
Returns:
- Type
- string
getObjectKeys() → {Array.<string>}
If value is a map of fields, it returns keys of map, otherwise it returns null
Returns:
- Type
- Array.<string>
getObjectValue(key) → {RequestParameter}
If value is a map of fields, it returns value of field with key provided, otherwise it returns null
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string |
Returns:
- Type
- RequestParameter
getString() → {string}
Returns null if value is not a String, otherwise it returns value
Returns:
- Type
- string
isArray() → {boolean}
Returns true if value of RequestParameter is an array
Returns:
- Type
- boolean
isBoolean() → {boolean}
Returns true if value of RequestParameter is a Boolean instance
Returns:
- Type
- boolean
isDouble() → {boolean}
Returns true if value of RequestParameter is a Double instance
Returns:
- Type
- boolean
isEmpty() → {boolean}
Alias of RequestParameter#isNull
Returns:
- Type
- boolean
isFloat() → {boolean}
Returns true if value of RequestParameter is a Float instance
Returns:
- Type
- boolean
isInteger() → {boolean}
Returns true if value of RequestParameter is an Integer instance
Returns:
- Type
- boolean
isJsonArray() → {boolean}
Returns true if value of RequestParameter is a JsonArray instance
Returns:
- Type
- boolean
isJsonObject() → {boolean}
Returns true if value of RequestParameter is a JsonObject instance
Returns:
- Type
- boolean
isLong() → {boolean}
Returns true if value of RequestParameter is a Long instance
Returns:
- Type
- boolean
isNull() → {boolean}
Returns true if value is null
Returns:
- Type
- boolean
isObject() → {boolean}
Returns true if value of RequestParameter is a map of fields
Returns:
- Type
- boolean
isString() → {boolean}
Returns true if value of RequestParameter is a String instance
Returns:
- Type
- boolean
merge(otherParameter) → {RequestParameter}
Merge this request parameter with another one. Note: the parameter passed by argument has the priority
Parameters:
| Name | Type | Description |
|---|---|---|
otherParameter |
RequestParameter |
Returns:
- Type
- RequestParameter
setName(name)
Set parameter name
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string |
setValue(value)
Set value
Parameters:
| Name | Type | Description |
|---|---|---|
value |
Object |
toJson() → {Object}
Converts deeply this RequestParameter in a Json representation
Returns:
- Type
- Object