Package com.uc4.api.objects
Class ConditionsSet
- java.lang.Object
-
- com.uc4.api.objects.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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(ConditionOrAction item)
Adds a new condition.void
checkAllowedCondition(ConditionOrAction ca)
This method checks if the passedConditionOrAction
is allowed in a Pre/Post Condition tab (included sub conditions/actions).void
clear()
Removes all conditions.ConditionsSet
copy()
Creates a deep copy of this objectjava.util.Iterator<ConditionOrAction>
iterator()
int
size()
-
-
-
Method Detail
-
clear
public void clear()
Removes all conditions.
-
iterator
public java.util.Iterator<ConditionOrAction> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<ConditionOrAction>
-
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 passedConditionOrAction
is allowed in a Pre/Post Condition tab (included sub conditions/actions). If not, anInvalidObjectException
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
-
-