nx.data.SortedMap Class
Item Index
Methods
Properties
Methods
add
-
key
-
value
-
index
Add or insert an value with specified key and index.
Parameters:
Returns:
The created entry.
dispose
()
Dispose current object.
getBinding
-
prop
Get existing binding object for specified property.
Parameters:
-
prop
Object
Returns:
getKeyAt
-
index
Get the key at specified index.
Parameters:
-
index
ObjectThe index.
Returns:
The key, null if not exists.
getValue
-
key
Get a value with specified key.
Parameters:
-
key
ObjectThe value's key.
Returns:
The value.
getValueAt
-
index
Get a value with speicifed index.
Parameters:
-
index
ObjectThe value's index.
Returns:
The value.
indexOf
-
key
Get the index of specified key.
Parameters:
-
key
ObjectThe key.
Returns:
The index, -1 if not exists.
remove
-
key
Remove value(s) from SortedMap by key(s).
Parameters:
-
key
ObjectThe key of value attempt to be removed.
Returns:
Removed value.
removeAt
-
index
Remove value from SortedMap by index.
Parameters:
-
index
ObjectThe index of value attempt to be removed.
Returns:
Removed value.
setBinding
-
prop
-
expr
-
source
Set binding for specified property.
setValue
-
key
-
value
Change value of specified key.
Returns:
The new value.
setValueAt
-
index
-
value
Change value of speicifed index.
Returns:
The new value.
sort
-
comparer
Sort the SortedMap with a comparer function.
Parameters:
-
comparer
ObjectA function expecting arguments: key1, value1, key2, value2
toArray
()
Get array of key-value pairs of all entries.
Returns:
An array, each item of which is an object with key and value property.
Properties
length
Unknown
The length of SortedMap.