ilog.rules.teamserver.model.states

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

  • Type Parameters:
    State - A Java enumeration.


    public class SingleConditionTransitionSystem<State extends java.lang.Enum<State>>
    extends ConditionalTransitionSystem<State>

    Declares a conditional transition system where all the transitions have the same condition attached.

    • Constructor Detail

      • SingleConditionTransitionSystem

        public SingleConditionTransitionSystem(java.lang.Class<State> stateClass)

        Constructs a transition system for the states in the State enumeration passed as a parameter to this class. No condition is provided to this constructor; it can be provided later with the setCondition(TransitionCondition) method.

        Since type information is not available at run-time for Java generic classes, the reflective Class object for the state enumeration has to be provided to the constructor.

        Parameters:
        stateClass - The reflective object for the state enumeration.
      • SingleConditionTransitionSystem

        public SingleConditionTransitionSystem(java.lang.Class<State> stateClass,
                                       TransitionCondition<State> condition)

        Constructs a transition system for the states in the State enumeration passed as a parameter to this class. The condition provided is attached to all transitions.

        Since type information is not available at run-time for Java generic classes, the reflective Class object for the state enumeration has to be provided to the constructor.

        Parameters:
        stateClass - The reflective object for the state enumeration.
    • Method Detail

      • getCondition

        public TransitionCondition<State> getCondition(State s1,
                                              State s2)
        Description copied from class: ConditionalTransitionSystem

        Returns the condition attached to the provided transition, or null if no condition is attached to the provided transition.

        Specified by:
        getCondition in class ConditionalTransitionSystem<State extends java.lang.Enum<State>>
        Parameters:
        s1 - The start state of the transition, or null when checking whether s2 is allowed as an initial state.
        s2 - Then end state of the transition. Cannot be null.
        Returns:
        the condition attached to the provided transition, or null.
      • setCondition

        public TransitionCondition<State> setCondition(TransitionCondition<State> condition)

        Attaches the provided condition to all transitions. If null is provided, detaches the previously attached condition, if any. In all cases, the previously attached condition is returned.

        Parameters:
        condition - A transition condition, or null.
        Returns:
        the previously attached condition.

© Copyright IBM Corp. 1987, 2017