ilog.rules.teamserver.model.states

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

  • Type Parameters:
    State - A Java enumeration.
    Direct Known Subclasses:
    RoleTransitionSystem


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

    Declares a conditional transition system where a distinct condition can be attached to each transition.

    • Field Detail

      • initialStateConditions

        protected java.util.EnumMap<State extends java.lang.Enum<State>,TransitionCondition<State extends java.lang.Enum<State>>> initialStateConditions
        Conditions for the transitions to initial states.
      • conditions

        protected java.util.EnumMap<State extends java.lang.Enum<State>,java.util.EnumMap<State extends java.lang.Enum<State>,TransitionCondition<State extends java.lang.Enum<State>>>> conditions
        Conditions for the transitions between states.
    • Constructor Detail

      • TableConditionalTransitionSystem

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

        Constructs a transition system for the states in the State enumeration passed as a parameter to this class. 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

      • hasCondition

        public boolean hasCondition(State s1,
                           State s2)
        Description copied from class: ConditionalTransitionSystem

        Indicates whether a condition is attached to the provided transition.

        Overrides:
        hasCondition in class ConditionalTransitionSystem<State extends java.lang.Enum<State>>
        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:
        true if a condition is attached to the provided transition.
      • 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(State s1,
                                              State s2,
                                              TransitionCondition<State> condition)

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

        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.
        condition - A transition condition, or null.
        Returns:
        the previously attached condition.

© Copyright IBM Corp. 1987, 2017