Package com.uc4.api.objects
Class ConditionsSet
java.lang.Object
com.uc4.api.objects.ConditionsSet
- All Implemented Interfaces:
Iterable<ConditionOrAction>
Container for conditions.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ConditionsSet
(boolean preCondition, Element task, String idnr, String lnr) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(ConditionOrAction item) Adds a new condition.void
This method checks if the passedConditionOrAction
is allowed in a Pre/Post Condition tab (included sub conditions/actions).void
clear()
Removes all conditions.copy()
Creates a deep copy of this objectiterator()
int
size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ConditionsSet
-
-
Method Details
-
clear
public void clear()Removes all conditions. -
iterator
- Specified by:
iterator
in interfaceIterable<ConditionOrAction>
-
add
Adds a new condition.- Parameters:
item
- Sub class of ConditionOrAction
-
size
public int size()- Returns:
- Number of conditions/actions
-
checkAllowedCondition
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:
InvalidObjectException
- if the condition or action is not valid
-
copy
Creates a deep copy of this object- Returns:
- A copy of this object
-