ilog.rules.teamserver.model.states

Class OtherStateTransitionCondition<State extends java.lang.Enum<State>,OtherState extends java.lang.Enum<OtherState>>

  • Type Parameters:
    State - A Java enumeration. The state for which the transition is assessed.
    OtherState - A Java enumeration. The state on which the decision is based.


    public class OtherStateTransitionCondition<State extends java.lang.Enum<State>,OtherState extends java.lang.Enum<OtherState>>
    extends AbstractTransitionCondition<State>

    Defines a condition by which a transition between states is allowed depending on another state.

    • Constructor Detail

      • OtherStateTransitionCondition

        public OtherStateTransitionCondition(ControlledState<OtherState> otherState,
                                     java.util.EnumSet<OtherState> values)

        Constructs a transition condition that is satisfied when the other state provided has one of the given values.

        Throws:
        java.lang.NullPointerException - is any argument is null.
        Parameters:
        otherState - The state on which the decision is based.
        values - A set of values that the state must belong to.
      • OtherStateTransitionCondition

        public OtherStateTransitionCondition(ControlledState<OtherState> otherState,
                                     OtherState value)

        Constructs a transition condition that is satisfied when the other state provided has the given value.

        Throws:
        java.lang.NullPointerException - is any argument is null.
        Parameters:
        otherState - The state on which the decision is based.
        value - The value that the state must be equal to.
    • Method Detail

      • check

        public boolean check(State s1,
                    State s2)
        Description copied from class: TransitionCondition

        Indicates whether the condition for the provided transition is satisfied.

        Specified by:
        check in class TransitionCondition<State extends java.lang.Enum<State>>
        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.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

© Copyright IBM Corp. 1987, 2017