be.ac.vub.cocompose.lang.impl.constraints
Class DefaultCompositeConstraint
java.lang.Object
be.ac.vub.cocompose.lang.impl.DefaultElement
be.ac.vub.cocompose.lang.impl.core.DefaultModelElement
be.ac.vub.cocompose.lang.impl.core.DefaultNamespace
be.ac.vub.cocompose.lang.impl.constraints.DefaultConstraint
be.ac.vub.cocompose.lang.impl.constraints.DefaultCompositeConstraint
- All Implemented Interfaces:
- Cloneable, CompositeConstraint, Constraint, Element, ModelElement, Namespace, VisitedElement
- Direct Known Subclasses:
- DefaultAndConstraint, DefaultOrConstraint
- public abstract class DefaultCompositeConstraint
- extends DefaultConstraint
- implements CompositeConstraint
Composite constraint.
- Since:
- 0.2.0
- Version:
- 0.2.0
- Author:
- Dennis Wagelaar
Methods inherited from class be.ac.vub.cocompose.lang.impl.core.DefaultNamespace |
addOwnedElement, getDeepOwnedElement, getDeepOwnedElements, getOwnedElement, getOwnedElements, getOwnedElements, getOwnedIds, getRootNamespace, isRegistered, registerNameChange, translateIndex, translateIndex |
DefaultCompositeConstraint
public DefaultCompositeConstraint()
accept
public void accept(ModelVisitor modelVisitor)
throws ModelElementException
- Accepts a visitor.
- Specified by:
accept
in interface VisitedElement
- Overrides:
accept
in class DefaultConstraint
- Parameters:
modelVisitor
- The visitor to accept.
- Throws:
ModelElementException
acceptSuper
public void acceptSuper(ModelVisitor modelVisitor)
throws ModelElementException
- Invokes superclass accept().
- Overrides:
acceptSuper
in class DefaultConstraint
- Parameters:
modelVisitor
- The visitor to accept.
- Throws:
ModelElementException
- See Also:
accept(ModelVisitor)
getOwnedConstraints
public List getOwnedConstraints()
- Returns the child constraints.
- Specified by:
getOwnedConstraints
in interface CompositeConstraint
- Returns:
- a copy of the List of child constraints.
addOwnedElement
public void addOwnedElement(int index,
ModelElement modelElement)
throws ModelElementException
- Adds an element to this namespace.
- Specified by:
addOwnedElement
in interface Namespace
- Overrides:
addOwnedElement
in class DefaultNamespace
- Parameters:
index
- - the index at which to add the element.modelElement
- - the element to add.
- Throws:
ModelElementException
- - if the name of the element is already used within this namespace.
removeOwnedElement
public void removeOwnedElement(ModelElement modelElement)
- Removes a element from this namespace.
- Specified by:
removeOwnedElement
in interface Namespace
- Overrides:
removeOwnedElement
in class DefaultNamespace
- Parameters:
modelElement
- - the element to remove.