Class CompoundSlotAccessor

    • Constructor Detail

      • CompoundSlotAccessor

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

      • bind

        public CompoundSlotAccessor bind​(IDecisionVariable variable,
                                         java.lang.String slotName,
                                         EvaluationContext context)
        Binds the accessor to the given variable and context.
        Parameters:
        variable - the underlying variable
        slotName - the name of the slot within value
        context - the evaluation context
        Returns:
        this (builder pattern)
      • bind

        public CompoundSlotAccessor bind​(LocalDecisionVariable variable,
                                         java.lang.String slotName,
                                         EvaluationContext context)
        Binds the accessor to the given variable and context.
        Parameters:
        variable - the underlying variable
        slotName - the name of the slot within value
        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
      • assignValue

        private final boolean assignValue​(Value value,
                                          boolean asAssignment)
        Assigns the value.
        Parameters:
        value - the value
        asAssignment - does this happen through an IVML assignment operation
        Returns:
        whether the assignment was successful or not
      • 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