code: public synchronized void addObserver(Observer o) {
          if (o == null)
              throw new NullPointerException();
          if (!observers.contains(o)) {
              observers.add(o);
          }
      }
docs: Adds an observer to the set of observers for this object, provided
  that it is not the same as some observer already in the set.
  The order in which notifications will be delivered to multiple
  observers is not specified. See the class comment.
  
  @param   o   an observer to be added.
  @throws NullPointerException   if the parameter o is null.