Class PartialEvaluationBlock

    • Constructor Detail

      • PartialEvaluationBlock

        public PartialEvaluationBlock​(java.lang.String name,
                                      IModelElement parent)
        Constructor for the partial evaluation block.
        Parameters:
        name - Name of the partial evaluation block
        parent - the object, in which this specific one is embedded
      • PartialEvaluationBlock

        public PartialEvaluationBlock​(java.lang.String name,
                                      IPartialEvaluable[] elements,
                                      IModelElement parent)
        Constructor for the partial evaluation block.
        Parameters:
        name - Name of the partial evaluation block
        elements - the evaluable elements
        parent - the object, in which this specific one is embedded
      • PartialEvaluationBlock

        public PartialEvaluationBlock​(java.lang.String name,
                                      IPartialEvaluable[] elements,
                                      PartialEvaluationBlock[] nested,
                                      IModelElement parent)
        Constructor for the partial evaluation block.
        Parameters:
        name - Name of the partial evaluation block
        elements - the evaluable elements
        nested - nested evaluation blocks (may be null)
        parent - the object, in which this specific one is embedded
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Checks whether the evaluation block is empty.
        Overrides:
        isEmpty in class EvaluationBlock
        Returns:
        true if empty
      • getEvaluable

        public IPartialEvaluable getEvaluable​(int index)
        Returns the constraint specified by index.
        Parameters:
        index - a 0-based index specifying the evaluable to be returned
        Returns:
        the specified evaluable
        Throws:
        java.lang.IndexOutOfBoundsException - if index<0 || index>=getEvaluableCount()
      • getEvaluableCount

        public int getEvaluableCount()
        Returns the number of constraints.
        Returns:
        the number of constraints
      • setEvaluables

        public void setEvaluables​(IPartialEvaluable[] elements)
        Changes the evaluables. [required as consequence of parent elements]
        Parameters:
        elements - the new evaluables (may be null)
      • getNested

        public PartialEvaluationBlock getNested​(int index)
        Returns the nested block specified by index.
        Parameters:
        index - a 0-based index specifying the block to be returned
        Returns:
        the specified nested block
        Throws:
        java.lang.IndexOutOfBoundsException - if index<0 || index>=getNestedCount()
      • getNestedCount

        public int getNestedCount()
        Returns the number of nested blocks.
        Returns:
        the number of nested blocks
      • setNested

        public void setNested​(PartialEvaluationBlock[] nested)
        Changes the nested blocks. [required as consequence of parent elements]
        Parameters:
        nested - the new nested blocks (may be null)
      • accept

        public void accept​(IModelVisitor visitor)
        Description copied from interface: IModelElement
        Accept method for the visitor.
        Parameters:
        visitor - The visitor, which should process this model element.
      • getModelElement

        public ContainableModelElement getModelElement​(int index)
        Returns the specified model element.
        Parameters:
        index - the 0-based index of the model element
        Returns:
        the model-element
        Throws:
        java.lang.IndexOutOfBoundsException - if index < 0 || index >=getModelElementCount()
      • getModelElementCount

        public int getModelElementCount()
        Returns the number of model elements.
        Returns:
        the number of model elements
      • addModelElement

        public void addModelElement​(ContainableModelElement element)
        Adds a model element in sequence. Please note that this method refers to all contained model elements, i.e., decision variables and constraints and is intended to restore the input sequence correctly.
        Parameters:
        element - the model element