Package com._1c.g5.v8.dt.common
Class EObjectTrie
java.lang.Object
com._1c.g5.v8.dt.common.EObjectTrie
- All Implemented Interfaces:
IEObjectTrie
The default implementation of
IEObjectTrie that supports filtered view. The filtered view allows to
use some subtree of the origin trie.-
Nested Class Summary
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.common.IEObjectTrie
IEObjectTrie.INode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom._1c.g5.v8.dt.common.EObjectTrie.NodeaddPath(org.eclipse.xtext.naming.QualifiedName qualifiedName) Adds an empty node to the trie achievable by the given path.booleanbelongsTo(org.eclipse.xtext.naming.QualifiedName qualifiedName) Checks whether the special path belongs to thisIEObjectTrie.getChildren(org.eclipse.xtext.naming.QualifiedName qualifiedName) Gets the children of the trie node achievable by the given path.getNode(org.eclipse.xtext.naming.QualifiedName qualifiedName) Gets the trie node associated with the given path.Gets theIEObjectTrie.INodecomparator to sort child nodes in the trie.Gets the root outgoing edges.booleanhasChildren(org.eclipse.xtext.naming.QualifiedName qualifiedName) Returnstrueif the trie node achievable by the given path has children.voidmarkPath(org.eclipse.xtext.naming.QualifiedName qualifiedName) Marks the given path.booleanremove(org.eclipse.xtext.naming.QualifiedName qualifiedName) Deletes the trie node associated with the given path.voidsetEObject(org.eclipse.xtext.naming.QualifiedName qualifiedName, org.eclipse.emf.ecore.EObject eObject) Sets the givenEObjectto the trie node achievable by the given path.voidsetFilteredViewActive(boolean isFilteredViewActive) Sets the 'isFilteredViewActive' flag.voidsetNodeComparator(Comparator<IEObjectTrie.INode> nodeComparator) Sets theIEObjectTrie.INodecomparator to sort child nodes in the trie.
-
Constructor Details
-
EObjectTrie
public EObjectTrie()
-
-
Method Details
-
getNode
Description copied from interface:IEObjectTrieGets the trie node associated with the given path.- Specified by:
getNodein interfaceIEObjectTrie- Parameters:
qualifiedName- the given path, can not benull- Returns:
- the node associated with the given path, may be
nullif no node achievable by the given path
-
getRootOutgoingEdges
Description copied from interface:IEObjectTrieGets the root outgoing edges.- Specified by:
getRootOutgoingEdgesin interfaceIEObjectTrie- Returns:
- the root outer edges, can not be
null
-
getChildren
public Collection<IEObjectTrie.INode> getChildren(org.eclipse.xtext.naming.QualifiedName qualifiedName) Description copied from interface:IEObjectTrieGets the children of the trie node achievable by the given path.- Specified by:
getChildrenin interfaceIEObjectTrie- Parameters:
qualifiedName- the given path, can not benull- Returns:
- the children of the trie node, can not be
null
-
hasChildren
public boolean hasChildren(org.eclipse.xtext.naming.QualifiedName qualifiedName) Description copied from interface:IEObjectTrieReturnstrueif the trie node achievable by the given path has children.- Specified by:
hasChildrenin interfaceIEObjectTrie- Parameters:
qualifiedName- the given path, can not benull- Returns:
trueif the trie node achievable by the given path has children.
-
belongsTo
public boolean belongsTo(org.eclipse.xtext.naming.QualifiedName qualifiedName) Description copied from interface:IEObjectTrieChecks whether the special path belongs to thisIEObjectTrie.- Specified by:
belongsToin interfaceIEObjectTrie- Parameters:
qualifiedName- the special path, can not benull- Returns:
trueif the special path belongs to thisIEObjectTrieandfalseotherwise
-
addPath
public com._1c.g5.v8.dt.common.EObjectTrie.Node addPath(org.eclipse.xtext.naming.QualifiedName qualifiedName) Adds an empty node to the trie achievable by the given path. If this trie contained a node for the given path, the old value is not replaced by a new one.- Parameters:
qualifiedName- the given path from the trie root to put node, can not benull- Returns:
- the newly added child or the previous child node associated with the given path, can not be
null
-
setEObject
public void setEObject(org.eclipse.xtext.naming.QualifiedName qualifiedName, org.eclipse.emf.ecore.EObject eObject) Sets the givenEObjectto the trie node achievable by the given path.- Parameters:
qualifiedName- the given path, can not benulleObject- the givenEObject, can not benull
-
setFilteredViewActive
public void setFilteredViewActive(boolean isFilteredViewActive) Sets the 'isFilteredViewActive' flag.- Parameters:
isFilteredViewActive-trueif the trie is in the filtered view andfalseotherwise
-
markPath
public void markPath(org.eclipse.xtext.naming.QualifiedName qualifiedName) Marks the given path. It used to select some subtree of the original trie and use only this subtree.- Parameters:
qualifiedName- the given path, can not benull
-
remove
public boolean remove(org.eclipse.xtext.naming.QualifiedName qualifiedName) Description copied from interface:IEObjectTrieDeletes the trie node associated with the given path.- Specified by:
removein interfaceIEObjectTrie- Parameters:
qualifiedName- the given path, can not benull- Returns:
trueif node associated with the given path was deleted,falseotherwise
-
getNodeComparator
Gets theIEObjectTrie.INodecomparator to sort child nodes in the trie.- Returns:
- nodeComparator the current
IEObjectTrie.INodecomparator, can benull
-
setNodeComparator
Sets theIEObjectTrie.INodecomparator to sort child nodes in the trie.- Parameters:
nodeComparator- the givenIEObjectTrie.INodecomparator, cannot benull
-