ilog.rules.teamserver.model.states

Class TransitionCondition<State extends java.lang.Enum<State>>

  • java.lang.Object
    • ilog.rules.teamserver.model.states.TransitionCondition<State>
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      abstract TransitionCondition<State> and(TransitionCondition<State>... conjuncts)
      Returns a condition that is logically equivalent to the conjunction of this condition and the provided ones.
      abstract boolean check(State s1, State s2)
      Indicates whether the condition for the provided transition is satisfied.
      abstract TransitionCondition<State> impossibleTransitionCause(State s1, State s2)
      Returns the part of this condition that causes the provided transition to be impossible.
      abstract TransitionCondition<State> not()
      Returns a condition that is logically equivalent to the negation of this condition.
      abstract TransitionCondition<State> or(TransitionCondition<State>... disjuncts)
      Returns a condition that is logically equivalent to the disjunction of this condition and the provided ones.
      protected boolean toStringNeedsParentheses()
      Indicates whether the string representation of this condition, if inserted in the string representation of a larger formula, should be enclosed in parentheses to respect operator precedence.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TransitionCondition

        public TransitionCondition()
    • Method Detail

      • check

        public abstract boolean check(State s1,
                    State s2)

        Indicates whether the condition for the provided transition is satisfied.

        Throws:
        java.lang.NullPointerException - if s2 is null.
        Parameters:
        s1 - The start state of the transition, or null for transitions to s2 as an initial state.
        s2 - Then end state of the transition. Cannot be null.
        Returns:
        true if this condition allows a transition from s1 to s2.
      • impossibleTransitionCause

        public abstract TransitionCondition<State> impossibleTransitionCause(State s1,
                                                           State s2)

        Returns the part of this condition that causes the provided transition to be impossible.

        Note: This method assumes that the provided transition is indeed not allowed by this condition. It does not test it. Unspecified result is returned if this method is called on a transition that is allowed by this condition.

        Throws:
        java.lang.NullPointerException - if s2 is null.
        Parameters:
        s1 - The start state of the transition, or null when checking whether s2 is an allowed initial state.
        s2 - Then end state of the transition. Cannot be null.
        Returns:
        an instance of TransitionCondition that is not satisfied, which causes the provided transition to be impossible.
      • not

        public abstract TransitionCondition<State> not()

        Returns a condition that is logically equivalent to the negation of this condition. No assumption should be made on whether this condition or a new instance of TransitionCondition is returned.

        Returns:
        the negation of this condition.
      • and

        public abstract TransitionCondition<State> and(TransitionCondition<State>... conjuncts)

        Returns a condition that is logically equivalent to the conjunction of this condition and the provided ones. No assumption should be made on whether this condition or a new instance of TransitionCondition is returned.

        Parameters:
        conjuncts - Zero or more transition conditions.
        Returns:
        the conjunction of this condition and the provided conjuncts.
      • or

        public abstract TransitionCondition<State> or(TransitionCondition<State>... disjuncts)

        Returns a condition that is logically equivalent to the disjunction of this condition and the provided ones. No assumption should be made on whether this condition or a new instance of TransitionCondition is returned.

        Parameters:
        disjuncts - Zero or more transition conditions.
        Returns:
        the disjunction of this condition and the provided disjuncts.
      • toStringNeedsParentheses

        protected boolean toStringNeedsParentheses()

        Indicates whether the string representation of this condition, if inserted in the string representation of a larger formula, should be enclosed in parentheses to respect operator precedence.

        Returns:
        true if this condition is a combination of several other conditions.

© Copyright IBM Corp. 1987, 2017