new Query(collection) → {Query}
An object that maps case insensitive keys to values. A map cannot contain duplicate keys each key can map to at most one value.
Parameters:
Name | Type | Description |
---|---|---|
collection |
Object | The map whose mappings are to be placed in this map |
- Source:
Returns:
- Type
- Query
Extends
Members
(private) map :Object
The mapping table.
Type:
- Object
- Overrides:
- Source:
(private) marshal :function
The marshal mechanism for converting String to Headers.
Type:
- function
- Overrides:
- Source:
- See:
-
- QueryMarshal#marshal
(private) unmarshal :function
The marshal mechanism for converting Headers to String.
Type:
- function
- Overrides:
- Source:
- See:
-
- QueryMarshal#unmarshal
Methods
clear() → {void}
Removes all mappings from this map. The map will be empty after this call returns.
- Inherited From:
- Source:
Returns:
- Type
- void
containsKey(key) → {String|Boolean}
Returns original key if this map contains a mapping for the specified key with a case sensitive check, otherwise returns false.
Parameters:
Name | Type | Description |
---|---|---|
key |
String | Specified key to evaluate existance of. |
- Inherited From:
- Source:
Returns:
- Type
- String | Boolean
containsValue(value) → {String|Boolean}
Returns original value if this map contains a mapping for the specified value with a case sensitive check, otherwise returns false.
Parameters:
Name | Type | Description |
---|---|---|
value |
String | Specified value to evaluate existance of. |
- Inherited From:
- Source:
Returns:
- Type
- String | Boolean
get(key) → {Object}
Retrieves value of the specified key.
Parameters:
Name | Type | Description |
---|---|---|
key |
Object |
- Inherited From:
- Source:
Returns:
- Type
- Object
isEmpty() → {Boolean}
Returns true if this map contains no key-value mappings.
- Inherited From:
- Source:
Returns:
- Type
- Boolean
put(key, value) → {void}
Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced.
When an arity of one argument is passed, the specified argument is treated as a collection and passed
to HashMap#putAll()
.
Parameters:
Name | Type | Description |
---|---|---|
key |
Object | |
value |
Object |
- Inherited From:
- Source:
Returns:
- Type
- void
putAll(collection) → {void}
Copies all of the mappings from the specified map to this map. These mappings will replace any mappings that this map had.
Parameters:
Name | Type | Description |
---|---|---|
collection |
Object | HashMap |
- Overrides:
- Source:
Returns:
- Type
- void
remove(key) → {Null|Object}
Removes the mapping for the specified key from this map if present.
Parameters:
Name | Type | Description |
---|---|---|
key |
Object |
- Inherited From:
- Source:
Returns:
Returns the previous value or null should no value exist prior to removing.
- Type
- Null | Object
size() → {Number}
Returns the number of key-value mappings in this map.
- Inherited From:
- Source:
Returns:
- Type
- Number
toString() → {String}
Returns a JSON string representation of this map.
- Inherited From:
- Source:
Returns:
- Type
- String