Class Condition<T>

  • Type Parameters:
    T - answer type should be the same as the FlowItem type

    public abstract class Condition<T>
    extends Object
    Condition is used for back and forward transitions/Route in a FlowItem
    • Constructor Detail

      • Condition

        public Condition()
        Constructor without label
      • Condition

        public Condition​(String label)
        Constructor with label
        Parameters:
        label - (optional) used for render diagrams DiagramExporter
    • Method Detail

      • getLabel

        public String getLabel()
        Gets the defined label for this Condition
        Returns:
        defined label
      • apply

        public abstract boolean apply​(T answer)
        Specifies what happens on on the transition with the given answer
        Parameters:
        answer - passed for optional usage
        Returns:
        true if transition is allowed else false