public void addObserver(Observer observer){
  Assert.notNull("observer",observer);
  observers.addIfAbsent(observer);
}

public void addObserver ( Observer observer ) { Assert . notNull ( "observer" , observer ) ; observers . addIfAbsent ( observer ) ; }
adds an observer to the set of observers for this object .
