IElement startpoint = association.getStartpoint();
IElement endpoint = association.getEndpoint();
if (!elements.contains(startpoint))
{
throw new ElementNotContainedException(this, startpoint);
}
else if (!elements.contains(endpoint))
{
throw new ElementNotContainedException(this, endpoint);
}
return associations.add(association);
}