Interface IDecisionVariable

    • Method Detail

      • getValue

        Value getValue()
        Returns the current value of this IDecisionVariable.
        Returns:
        the value (may be null)
      • getNestedElement

        IDecisionVariable getNestedElement​(int index)
        Returns the element specified by index. [also req SAP]
        Parameters:
        index - a 0-based index specifying the element to be returned
        Returns:
        the element
        Throws:
        java.lang.IndexOutOfBoundsException - if index<0 || index>=getNestedElementsCount()
      • getNestedElement

        IDecisionVariable getNestedElement​(java.lang.String name)
        Returns an element specified by its name.
        Parameters:
        name - the name of the nested element
        Returns:
        the nested element (may be null)
      • getAttributesCount

        int getAttributesCount()
        Returns the number of attributes.
        Returns:
        the number of attributes
      • getAttribute

        IDecisionVariable getAttribute​(int index)
        Returns a specific attribute.
        Parameters:
        index - the index of the attribute
        Returns:
        the attribute
        Throws:
        java.lang.IndexOutOfBoundsException - if index<0 || index>=getAttributesCount()
      • isVisible

        boolean isVisible()
        Returns whether this variable is visible by the user.
        Returns:
        false if the variable is hidden by an interface, true otherwise
      • isLocal

        boolean isLocal()
        Returns whether this variable is local, e.g., as a parameter of a user-defined function, a variable defined by a let-expression, or an iterator in a container operation.
        Returns:
        false if the variable is not local and part of an usual configuration, true if the variable is local
      • hasValue

        boolean hasValue()
        Checks whether the variable has a configured Value.
        Returns:
        true if the variable has a value, false otherwise.
      • hasNullValue

        boolean hasNullValue()
        Checks whether the variable has a NullValue. Note: this method does not check whether the variable has a value.
        Returns:
        true if the variable has a NullValue, false otherwise.
      • removeDerivedValues

        boolean removeDerivedValues()
        Removes all (nested) values which are in state AssignmentState.DERIVED, i.e., all values which are propagated bay the reasoner. This will keep all user assigned AssignmentState.ASSIGNED and frozen AssignmentState.FROZEN values.
        Returns:
        true if there was a change, false if the variable keeps unchanged.
      • getQualifiedName

        java.lang.String getQualifiedName()
        Returns the qualified name of the declaration instance. This is build as follows:
        <Project name> :: [<Parent name>::]* <Declaration name>
        Returns:
        The qualified and unique name of the variable.
      • getResolutionPath

        IResolutionPathElement getResolutionPath()
        Returns a resolution path for this variable.
        Returns:
        the resolution path
      • notifyCreated

        void notifyCreated()
        Notifies this variable that it was created.
      • notifyWasAssigned

        boolean notifyWasAssigned​(Value value)
        Inform the variable independent of its own tracking that we believe that a value was assigned (although we did not due to equal values/performance reasons), in particular after resetting the track through CommandAssignmentState#compareTo(CommandAssignmentState).
        Parameters:
        value - the new value
        Returns:
        true whether this variable was defined before, false else
      • wasAssigned

        boolean wasAssigned()
        Returns whether a value was assigned (correlated, but independent of IConfigurationElement.getState()).
        Returns:
        true if a value was assigned, false else