Home

# Class goog.ds.FastListNode

Creates a new list node from an array.

extends goog.ds.AbstractFastDataNode

Instance Method Summary
| `add(?goog.ds.DataNode value)` Adds a child to this data node
| `get(string= opt_key) ⇒ (Array|goog.ds.DataNode|null)` Gets the value of this data node (if called without opt_key) or gets a child node (if called with opt_key).
| `getByIndex(number index) ⇒ ?goog.ds.DataNode` Gets a child node by (numeric) index.
| `getChildNode(string key, boolean= opt_create) ⇒ ?goog.ds.DataNode` Get a child node by name.
| `getChildNodeValue(string key) ⇒ ?Object` Returns the value of a child node.
| `getChildNodes() ⇒ (goog.ds.DataNode|goog.ds.DataNodeList|null)` Returns child nodes of this data node. Currently, only supports returning all children.
| `getCount() ⇒ number` Gets the number of child nodes.
| `getJsObject() ⇒ ?Object` Returns a javascript object representation of this data node. You should not modify the object returned by this function.
| `getKeyAsNumber_(string key) ⇒ ?number` Tries to interpret key as a numeric index enclosed by square brakcets.
| `indexOf(string name) ⇒ number` Returns the index of a named child nodes. This method only works if this list uses mixed name/indexed lookup, i.e. if its child node have an 'id' attribute.
| `isList() ⇒ boolean` Returns whether this data node is a list. Always returns true.
| `listSizeChanged_()` Fire data changes that are appropriate when the size of this list changes. Should be called whenever the list size has changed.
| `removeNode(string name) ⇒ boolean` Removes a child node.
| `set(?Object value)` Not supported for FastListNodes.

`setChildNode(string name, ?Object value) ⇒ ?Object`

Sets a child node. Creates the child if it does not exist. To set children at a certain index, use a key of the form '[index]'. Note, that you can only set values at existing numeric indices. To add a new node to this list, you have to use the add method. Calling this function makes any child nodes previously obtained for name invalid. You should not use these child nodes but instead obtain a new instance by calling getChildNode.

| `setNode(string name, ?Object value)` Sets a child node.