public class TopicRoleConstraint extends AbstractScopedTypedCardinalityConstraint
Modifier and Type | Field and Description |
---|---|
protected Collection |
assoctypes |
protected TopicConstraintCollection |
parent |
typespec
scope
maximum, minimum
INFINITY
Constructor and Description |
---|
TopicRoleConstraint(TopicConstraintCollection parent)
PUBLIC: Creates a new topic role constraint belonging to the given
collection.
|
Modifier and Type | Method and Description |
---|---|
void |
addAssociationType(TypeSpecification typespec)
PUBLIC: Adds an allowed association type.
|
Collection |
getAssociationTypes()
PUBLIC: Returns the set of allowed types of associations in
which this instances of this role may participate.
|
boolean |
matches(TMObjectIF object)
PUBLIC: Returns true if the object given is constrained by this
constraint.
|
void |
removeAssociationType(TypeSpecification typespec)
PUBLIC: Removes an allowed association type.
|
getTypeSpecification, setTypeSpecification
getScopeSpecification, setScopeSpecification
getMaximum, getMinimum, setMaximum, setMinimum
protected TopicConstraintCollection parent
protected Collection assoctypes
public TopicRoleConstraint(TopicConstraintCollection parent)
public Collection getAssociationTypes()
public void removeAssociationType(TypeSpecification typespec)
public void addAssociationType(TypeSpecification typespec)
public boolean matches(TMObjectIF object)
ConstraintIF
matches
in interface ConstraintIF
matches
in class AbstractScopedTypedCardinalityConstraint