public boolean removeInvoke(Invokes aInvoke) {
   boolean wasRemoved = false;
   // Unable to remove aInvoke, as it must always have a invoked
   if (!this.equals(aInvoke.getInvoked())) {
     invokes.remove(aInvoke);
     wasRemoved = true;
   }
   return wasRemoved;
 }
 public void delete() {
   for (int i = invoked.size(); i > 0; i--) {
     Invokes aInvoked = invoked.get(i - 1);
     aInvoked.delete();
   }
   for (int i = invokes.size(); i > 0; i--) {
     Invokes aInvoke = invokes.get(i - 1);
     aInvoke.delete();
   }
   for (int i = accesses.size(); i > 0; i--) {
     Accesses aAccess = accesses.get(i - 1);
     aAccess.delete();
   }
   for (int i = isParameterOfs.size(); i > 0; i--) {
     IsParameterOf aIsParameterOf = isParameterOfs.get(i - 1);
     aIsParameterOf.delete();
   }
   super.delete();
 }
 public boolean addInvoke(Invokes aInvoke) {
   boolean wasAdded = false;
   if (invokes.contains(aInvoke)) {
     return false;
   }
   if (invokes.contains(aInvoke)) {
     return false;
   }
   if (invokes.contains(aInvoke)) {
     return false;
   }
   if (invokes.contains(aInvoke)) {
     return false;
   }
   BehaviouralElement existingInvoked = aInvoke.getInvoked();
   boolean isNewInvoked = existingInvoked != null && !this.equals(existingInvoked);
   if (isNewInvoked) {
     aInvoke.setInvoked(this);
   } else {
     invokes.add(aInvoke);
   }
   wasAdded = true;
   return wasAdded;
 }