goog.ds.FastListNode
Classgoog.ds.FastListNode
> goog.ds.AbstractFastDataNode
> goog.ds.DataNodeList
> goog.ds.DataNode
goog.ds.FastListNode(values, dataName, opt_parent)
Creates a new list node from an array.
values
{Array
}
dataName
{string
}
opt_parent
{goog.ds.DataNode
=}
.add(value)
Adds a child to this data node
value
{goog.ds.DataNode
}
.get(opt_key)
Gets the value of this data node (if called without opt_key) or gets a child node (if called with opt_key).
opt_key
{string
=}
Array
|goog.ds.DataNode
}
.getByIndex(index)
Gets a child node by (numeric) index.
index
{number
}
goog.ds.DataNode
}
.getChildNode(key, opt_create)
Get a child node by name.
key
{string
}
opt_create
{boolean
=}
goog.ds.DataNode
}
.getChildNodeValue(key)
Returns the value of a child node.
key
{string
}
.getChildNodes()
Returns child nodes of this data node. Currently, only supports returning all children.
goog.ds.DataNodeList
}
.getCount()
Gets the number of child nodes.
number
}
.getDataName()
Inherited from goog.ds.AbstractFastDataNode
.
Return the name of this data node.
string
}
.getDataPath()
Inherited from goog.ds.AbstractFastDataNode
.
Get the path leading to this data node.
string
}
.getJsObject()
Returns a javascript object representation of this data node. You should not modify the object returned by this function.
Object
}
.getLoadState()
Inherited from goog.ds.DataNode
.
Gets the state of the backing data for this node
goog.ds.LoadState
}
.indexOf(name)
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.
name
{string
}
number
}
.isList()
Returns whether this data node is a list. Always returns true.
boolean
}
.load()
Inherited from goog.ds.DataNode
.
Load or reload the backing data for this node
.removeNode()
Removes a child node.
.set(value)
Not supported for FastListNodes.
value
{*}
.setChildNode()
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.
.setDataName(value)
Inherited from goog.ds.AbstractFastDataNode
.
Set the name of this data node.
value
{string
}
.setNode(name, value)
Sets a child node.
name
{string
}
value
{Object
}