Class ConditionsSet

  • All Implemented Interfaces:
    java.lang.Iterable<ConditionOrAction>

    public class ConditionsSet
    extends java.lang.Object
    implements java.lang.Iterable<ConditionOrAction>
    Container for conditions.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ConditionsSet​(boolean preCondition, org.w3c.dom.Element task, java.lang.String idnr, java.lang.String lnr)  
    • Constructor Detail

      • ConditionsSet

        protected ConditionsSet​(boolean preCondition,
                                org.w3c.dom.Element task,
                                java.lang.String idnr,
                                java.lang.String lnr)
    • Method Detail

      • clear

        public void clear()
        Removes all conditions.
      • add

        public void add​(ConditionOrAction item)
        Adds a new condition.
        Parameters:
        item - Sub class of ConditionOrAction
      • size

        public int size()
        Returns:
        Number of conditions/actions
      • checkAllowedCondition

        public void checkAllowedCondition​(ConditionOrAction ca)
                                   throws java.io.InvalidObjectException
        This method checks if the passed ConditionOrAction is allowed in a Pre/Post Condition tab (included sub conditions/actions). If not, an InvalidObjectException will be thrown.
        Parameters:
        ca - Condition or Action
        Throws:
        java.io.InvalidObjectException - if the condition or action is not valid
      • copy

        public ConditionsSet copy()
        Creates a deep copy of this object
        Returns:
        A copy of this object