Class ContainerElementAccessor

    • Constructor Detail

      • ContainerElementAccessor

        private ContainerElementAccessor()
        Creates an instance. Private due to pooling.
    • Method Detail

      • bind

        public ContainerElementAccessor bind​(IDecisionVariable variable,
                                             int index,
                                             EvaluationContext context)
        Binds the accessor to the given variable and context.
        Parameters:
        variable - the underlying variable
        index - the index of the element to access
        context - the evaluation context
        Returns:
        this (builder pattern)
      • setValue

        public boolean setValue​(Value value,
                                boolean asAssignment)
        Description copied from class: EvaluationAccessor
        Defines a new value for the accessed element. In case of failures, add appropriate messages to the context.
        Specified by:
        setValue in class EvaluationAccessor
        Parameters:
        value - the new value
        asAssignment - does this happen through an IVML assignment operation
        Returns:
        true if successful, false else
      • isAssignable

        public boolean isAssignable()
        Description copied from class: EvaluationAccessor
        Returns whether values can be assigned to this evaluator.
        Specified by:
        isAssignable in class EvaluationAccessor
        Returns:
        true if values can be assigned, false else