public void detach(Observer observer){
  if (mIterator != null) {
    mIterator.remove();
  }
 else {
    mObservers.remove(observer);
  }
}

public void detach ( Observer observer ) { if ( mIterator != null ) { mIterator . remove ( ) ; } else { mObservers . remove ( observer ) ; } }
detach an observer from this object .
