Class Precondition
java.lang.Object
cruise.umple.compiler.ConstraintVariable
cruise.umple.compiler.ConstraintTree
cruise.umple.compiler.Precondition
- All Implemented Interfaces:
Iterable<ConstraintVariable>
The Preconditions are constraints on methods, restricting the method so that it does not process if the constraint is not satisfied.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddElement(ConstraintVariable aElement) Adds a node to the tree, the three modes are - if nothing exists in the tree: set the element as the root - if the element is an operator: add the root if it is not null as an operand to the operator, and set the operator to the root - if there exists an operator: add the element as an operand to the operator.Creates a new instance of this class, it is used in clone and addElement in order to copy a tree so that there is a deep copy instead of a shallow one This method needs to be overrided for sub classes of ConstaintTree to function properly.voiddelete()booleanMethods inherited from class ConstraintTree
addElementAll, clone, equals, getDisplayBrackets, getDisplayNegation, getNamedNames, getNames, getNumberOfElements, getRequestor, getRoot, getShouldDisplayBrackets, getType, hashCode, isEqualTo, isNegatable, iterator, negate, setDisplayNegation, setNames, setNumberOfElements, setRequestor, setRoot, setShouldDisplayBrackets, toStringMethods inherited from class ConstraintVariable
getValue, retrieveClassifierMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
Precondition
-
-
Method Details
-
getMethod
-
setMethod
-
delete
public void delete()- Overrides:
deletein classConstraintTree
-
createNew
Description copied from class:ConstraintTreeCreates a new instance of this class, it is used in clone and addElement in order to copy a tree so that there is a deep copy instead of a shallow one This method needs to be overrided for sub classes of ConstaintTree to function properly.- Overrides:
createNewin classConstraintTree
-
addElement
Description copied from class:ConstraintTreeAdds a node to the tree, the three modes are - if nothing exists in the tree: set the element as the root - if the element is an operator: add the root if it is not null as an operand to the operator, and set the operator to the root - if there exists an operator: add the element as an operand to the operator.- Overrides:
addElementin classConstraintTree
-