Class EObjectTrie

java.lang.Object
com._1c.g5.v8.dt.common.EObjectTrie
All Implemented Interfaces:
IEObjectTrie

public class EObjectTrie extends Object implements IEObjectTrie
The default implementation of IEObjectTrie that supports filtered view. The filtered view allows to use some subtree of the origin trie.
  • Constructor Details

    • EObjectTrie

      public EObjectTrie()
  • Method Details

    • getNode

      public IEObjectTrie.INode getNode(org.eclipse.xtext.naming.QualifiedName qualifiedName)
      Description copied from interface: IEObjectTrie
      Gets the trie node associated with the given path.
      Specified by:
      getNode in interface IEObjectTrie
      Parameters:
      qualifiedName - the given path, can not be null
      Returns:
      the node associated with the given path, may be null if no node achievable by the given path
    • getRootOutgoingEdges

      public Set<String> getRootOutgoingEdges()
      Description copied from interface: IEObjectTrie
      Gets the root outgoing edges.
      Specified by:
      getRootOutgoingEdges in interface IEObjectTrie
      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: IEObjectTrie
      Gets the children of the trie node achievable by the given path.
      Specified by:
      getChildren in interface IEObjectTrie
      Parameters:
      qualifiedName - the given path, can not be null
      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: IEObjectTrie
      Returns true if the trie node achievable by the given path has children.
      Specified by:
      hasChildren in interface IEObjectTrie
      Parameters:
      qualifiedName - the given path, can not be null
      Returns:
      true if the trie node achievable by the given path has children.
    • belongsTo

      public boolean belongsTo(org.eclipse.xtext.naming.QualifiedName qualifiedName)
      Description copied from interface: IEObjectTrie
      Checks whether the special path belongs to this IEObjectTrie.
      Specified by:
      belongsTo in interface IEObjectTrie
      Parameters:
      qualifiedName - the special path, can not be null
      Returns:
      true if the special path belongs to this IEObjectTrie and false otherwise
    • 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 be null
      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 given EObject to the trie node achievable by the given path.
      Parameters:
      qualifiedName - the given path, can not be null
      eObject - the given EObject, can not be null
    • setFilteredViewActive

      public void setFilteredViewActive(boolean isFilteredViewActive)
      Sets the 'isFilteredViewActive' flag.
      Parameters:
      isFilteredViewActive - true if the trie is in the filtered view and false otherwise
    • 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 be null
    • remove

      public boolean remove(org.eclipse.xtext.naming.QualifiedName qualifiedName)
      Description copied from interface: IEObjectTrie
      Deletes the trie node associated with the given path.
      Specified by:
      remove in interface IEObjectTrie
      Parameters:
      qualifiedName - the given path, can not be null
      Returns:
      true if node associated with the given path was deleted, false otherwise
    • getNodeComparator

      public Comparator<IEObjectTrie.INode> getNodeComparator()
      Gets the IEObjectTrie.INode comparator to sort child nodes in the trie.
      Returns:
      nodeComparator the current IEObjectTrie.INode comparator, can be null
    • setNodeComparator

      public void setNodeComparator(Comparator<IEObjectTrie.INode> nodeComparator)
      Sets the IEObjectTrie.INode comparator to sort child nodes in the trie.
      Parameters:
      nodeComparator - the given IEObjectTrie.INode comparator, cannot be null