API Docs for: trial
Show:

nx.data.SortedMap Class

Module: nx.data

Methods

add

(
  • key
  • value
  • index
)

Add or insert an value with specified key and index.

Parameters:

  • key Object

    Specified key.

  • value Object

    (Optional) The value, default undefined.

  • index Object

    (Optional) Specified index, default append.

Returns:

The created entry.

clearBinding

(
  • prop
)

Inherited from nx.Observable:

Clear binding for specified property.

Parameters:

(
  • names
  • handler
  • context
)

Inherited from nx.Observable:

Parameters:

dispose

()

Inherited from nx.Observable:

Dispose current object.

getBinding

(
  • prop
)

Inherited from nx.Observable:

Get existing binding object for specified property.

Parameters:

Returns:

:

getKeyAt

(
  • index
)

Get the key at specified index.

Parameters:

Returns:

The key, null if not exists.

getValue

(
  • key
)

Get a value with specified key.

Parameters:

Returns:

The value.

getValueAt

(
  • index
)

Get a value with speicifed index.

Parameters:

  • index Object

    The value's index.

Returns:

The value.

indexOf

(
  • key
)

Get the index of specified key.

Parameters:

Returns:

The index, -1 if not exists.

notify

(
  • names
  • oldValue
)

Inherited from nx.Observable:

Parameters:

remove

(
  • key
)

Remove value(s) from SortedMap by key(s).

Parameters:

  • key Object

    The key of value attempt to be removed.

Returns:

Removed value.

removeAt

(
  • index
)

Remove value from SortedMap by index.

Parameters:

  • index Object

    The index of value attempt to be removed.

Returns:

Removed value.

setBinding

(
  • prop
  • expr
  • source
)

Inherited from nx.Observable:

Set binding for specified property.

Parameters:

setValue

(
  • key
  • value
)

Change value of specified key.

Parameters:

  • key Object

    The key attempt to be changed.

  • value Object

    The new value.

Returns:

The new value.

setValueAt

(
  • index
  • value
)

Change value of speicifed index.

Parameters:

  • index Object

    The index attempt to be changed.

  • value Object

    The new value.

Returns:

The new value.

sort

(
  • comparer
)

Sort the SortedMap with a comparer function.

Parameters:

  • comparer Object

    A 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.

unwatch

(
  • names
  • handler
  • context
)

Inherited from nx.Observable:

Parameters:

Properties

length

Unknown

The length of SortedMap.