The goog.ds.PrimitiveFastDataNode Class

goog.ds.PrimitiveFastDataNode
> goog.ds.AbstractFastDataNode
> goog.ds.DataNodeList
> goog.ds.DataNode

goog.ds.PrimitiveFastDataNode(value, dataName, opt_parent)

Creates a new data node wrapping a primitive value.

value {number|boolean|string}
Value the value to wrap.
dataName {string}
name Name of this data node.
opt_parent {goog.ds.DataNode=}
Parent of this data node.

.add(node)

Inherited from goog.ds.DataNodeList .

Add a node to the node list. If the node has a dataName, uses this for the key in the map.

node {goog.ds.DataNode}
The node to add.

.get()

Returns the value of this data node.

returns {(boolean|number|string)}
Value of this data node.

.getByIndex(index)

Inherited from goog.ds.DataNodeList .

Get a node by index Returns null if the index is out of range

index {number}
The index of the node.
returns {goog.ds.DataNode}
The node, or null if doesn't exist.

.getChildNode(name)

Get a child node by name. Always returns null.

name {string}
Name of child node.
returns {goog.ds.DataNode}
Child node.

.getChildNodeValue(name)

Returns the value of a child node. Always returns null.

name {string}
Name of child node.
returns {Object}
Value of child node.

.getChildNodes()

Returns child nodes of this data node. Always returns an unmodifiable, empty list.

returns {goog.ds.DataNodeList}
(Empty) list of child nodes.

.getCount()

Inherited from goog.ds.DataNodeList .

Gets the size of the node list

returns {number}
The size of the list.

.getDataName()

Inherited from goog.ds.AbstractFastDataNode .

Return the name of this data node.

returns {string}
Name of this data noden.

.getDataPath()

Inherited from goog.ds.AbstractFastDataNode .

Get the path leading to this data node.

returns {string}
Data path.

.getJsObject()

Returns a javascript object representation of this data node. You should not modify the object returned by this function.

returns {*}
Javascript object representation of this data node.

.getLoadState()

Inherited from goog.ds.DataNode .

Gets the state of the backing data for this node

returns {goog.ds.LoadState}
The state.

.isList()

Returns whether this data node is a list. Always returns false for instances of PrimitiveFastDataNode.

returns {boolean}
Whether this data node is array-like.

.load()

Inherited from goog.ds.DataNode .

Load or reload the backing data for this node

.removeNode(name)

Inherited from goog.ds.DataNodeList .

Removes a node in the list of a given name

name {string}
Name of the node.
returns {boolean}
True if node existed and was deleted.

.set(value)

Sets this data node to a new value.

value {*}
Value to set data node to.

.setChildNode(name, value)

Not supported by primitive data nodes.

name {string}
Name of child node.
value {Object}
Value of child node.

.setDataName(value)

Inherited from goog.ds.AbstractFastDataNode .

Set the name of this data node.

value {string}
Name.

.setNode(name, node)

Inherited from goog.ds.DataNodeList .

Sets a node in the list of a given name

name {string}
Name of the node.
node {goog.ds.DataNode}
The node.