Class VariableTreeTypeStateWithSubStates

    • Constructor Detail

      • VariableTreeTypeStateWithSubStates

        public VariableTreeTypeStateWithSubStates​(Variable variable,
                                                  Environments envs,
                                                  int offset,
                                                  org.eclipse.xtext.nodemodel.INode blockNode)
        Creates state
        Parameters:
        variable - Variable in BSL associated with this state
        envs - Environments for this state, can't be null
        offset - position in document, where this state was created
        blockNode - INode corresponding to the containment Block in Built-In Language, can't be null
    • Method Detail

      • getSubStates

        public List<VariableTreeTypeState> getSubStates​(Environments envs)
        Gets sub states for this state corresponding to the envs
        Parameters:
        envs - Environments for filtering sub states, each sub state environments should be contains any Environment from envs
        Returns:
        list of filtering sub states, never null
      • getConcreteState

        public VariableTreeTypeState getConcreteState​(Environments envs)
        Gets sub state for this state corresponding to the envs
        Parameters:
        envs - Environments for getting sub states, each sub state environments should be equals to envs.
        Returns:
        sub state for this state corresponding to the envs, if there is no corresponding su states it will be created and parent state should be depend on creating, never null
      • isEmptyState

        public boolean isEmptyState()
        Checks that there is no sub states
        Returns:
        true if there is no sub states, false otherwise
      • linkedState

        protected void linkedState​(VariableTreeTypeState parentState,
                                   VariableTreeTypeState childState)
        Links state each other
        Parameters:
        parentState - parent state for added child state, cannot be null
        childState - child state is added to parent state, cannot be null