|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.internal.dtree.AbstractDataTree
org.eclipse.core.internal.dtree.DataTree
public class DataTree
A DataTree
represents the complete information of a source tree.
The tree contains all information within its branches, and has no relation to any
other source trees (no parent and no children).
Constructor Summary | |
---|---|
DataTree()
Creates a new empty tree |
Method Summary | |
---|---|
AbstractDataTreeNode |
copyCompleteSubtree(org.eclipse.core.runtime.IPath key)
Returns a copy of the node subtree rooted at the given key. |
void |
createChild(org.eclipse.core.runtime.IPath parentKey,
java.lang.String localName)
Creates a new child in the tree. |
void |
createChild(org.eclipse.core.runtime.IPath parentKey,
java.lang.String localName,
java.lang.Object data)
Creates a new child in the tree. |
void |
createSubtree(org.eclipse.core.runtime.IPath key,
AbstractDataTreeNode subtree)
Creates or replaces a subtree in the tree. |
void |
deleteChild(org.eclipse.core.runtime.IPath parentKey,
java.lang.String localName)
Deletes a child of the tree. |
void |
empty()
Initializes the receiver. |
DataTreeNode |
findNodeAt(org.eclipse.core.runtime.IPath key)
Returns the specified node if it is present, otherwise returns null. |
java.lang.Object |
getData(org.eclipse.core.runtime.IPath key)
Returns the data at the specified node. |
java.lang.String[] |
getNamesOfChildren(org.eclipse.core.runtime.IPath parentKey)
Returns the names of the children of a node. |
boolean |
includes(org.eclipse.core.runtime.IPath key)
Returns true if the receiver includes a node with the given key, false otherwise. |
DataTreeLookup |
lookup(org.eclipse.core.runtime.IPath key)
Returns an object containing: - a flag indicating whether the specified node was found - the data for the node, if it was found |
void |
setData(org.eclipse.core.runtime.IPath key,
java.lang.Object data)
Sets the data at the specified node. |
Methods inherited from class org.eclipse.core.internal.dtree.AbstractDataTree |
---|
getChild, getChildCount, getChildren, getNameOfChild, immutable, isImmutable, rootKey |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataTree()
Method Detail |
---|
public AbstractDataTreeNode copyCompleteSubtree(org.eclipse.core.runtime.IPath key)
copyCompleteSubtree
in class AbstractDataTree
key
- Key of subtree to copypublic void createChild(org.eclipse.core.runtime.IPath parentKey, java.lang.String localName)
createChild
in class AbstractDataTree
parentKey
- key of parent for new child.localName
- name for new child.AbstractDataTree.createChild(IPath, String)
public void createChild(org.eclipse.core.runtime.IPath parentKey, java.lang.String localName, java.lang.Object data)
createChild
in class AbstractDataTree
parentKey
- key of parent for new child.localName
- name for new child.data
- the data for the new childAbstractDataTree.createChild(IPath, String, Object)
public void createSubtree(org.eclipse.core.runtime.IPath key, AbstractDataTreeNode subtree)
createSubtree
in class AbstractDataTree
key
- Key of parent node whose subtree we want to create/replace.subtree
- New node to insert into tree.public void deleteChild(org.eclipse.core.runtime.IPath parentKey, java.lang.String localName)
deleteChild
in class AbstractDataTree
parentKey
- parent of node to delete.localName
- name of node to delete.AbstractDataTree.deleteChild(IPath, String)
public void empty()
empty
in class AbstractDataTree
AbstractDataTree.empty()
public DataTreeNode findNodeAt(org.eclipse.core.runtime.IPath key)
key
- Key of node to returnpublic java.lang.Object getData(org.eclipse.core.runtime.IPath key)
getData
in class AbstractDataTree
key
- Node whose data to return.public java.lang.String[] getNamesOfChildren(org.eclipse.core.runtime.IPath parentKey)
getNamesOfChildren
in class AbstractDataTree
parentKey
- key of node whose children we want to retrieveAbstractDataTree.getNamesOfChildren(IPath)
public boolean includes(org.eclipse.core.runtime.IPath key)
includes
in class AbstractDataTree
key
- key of node to findpublic DataTreeLookup lookup(org.eclipse.core.runtime.IPath key)
lookup
in class AbstractDataTree
key
- key of node for which we want to retrieve data.public void setData(org.eclipse.core.runtime.IPath key, java.lang.Object data)
setData
in class AbstractDataTree
key
- key of node for which to set datadata
- new data value for nodeAbstractDataTree.setData(IPath, Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |