jsbeans

jsbeans  1.0.0

jsbeans > jsbeans > jsbeans.HashMap
Search:
 
Filters

Class jsbeans.HashMap

Javascript implementation of java.util.HashMap.
An object that maps keys to values. A map cannot contain duplicate keys; each key can map to at most one value.

Constructor

jsbeans.HashMap ( )

Methods

containsKey

boolean containsKey ( key )
Returns true if this map contains a mapping for the specified {@param} key.
Parameters:
key <String>
Returns: boolean

get

Object get ( key )
Returns the value to which the specified {@param} key is mapped, null if this map contains no mapping for the {@param} key.
Parameters:
key <String>
Returns: Object

keySet

Array<String> keySet ( )
Returns an Array view of the keys contained in this map.
Returns: Array<String>

order

void order ( [caseSensitive] )
Orders the key-value mapping by value.
This method changes the actual order of elements in instance.
Parameters:
[caseSensitive] <boolean> default true
Returns: void

orderByKey

void orderByKey ( [caseSensitive] )
Orders the key-value mapping by key.
This method changes the actual order of elements in instance.
Parameters:
[caseSensitive] <boolean> default true
Returns: void

orderByValue

void orderByValue ( [caseSensitive] )
See {@method} order.
Parameters:
[caseSensitive] <boolean> default true
Returns: void

put

Object put ( key , value )
Associates the specified {@param} value with the specified {@param} key in this map (optional operation). If the map previously contained a mapping for the {@param} key, the old value is replaced by the specified {@param} value.
Parameters:
key <String>
value <Object>
Returns: Object
the previous value associated with key, or null if there was no mapping for key.

remove

Object remove ( key )
Removes the mapping for the specified key from this map if present.
Parameters:
key <String> key whose mapping is to be removed from the map
Returns: Object
the previous value associated with key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with key.)

size

Integer size ( )
Returns the number of key-value mappings in this map.
Returns: Integer

values

Array<Object> values ( )
Returns an Array view of the values contained in this map.
Returns: Array<Object>


Copyright © 2016 Francesco Mele. All rights reserved.