Class 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 Detail

      • EObjectTrie

        public EObjectTrie()
    • Method Detail

      • 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
      • 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