@SuppressWarnings("unchecked") private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException {
  s.defaultReadObject();
  Object listenerOrNull;
  while (null != (listenerOrNull=s.readObject())) {
    add((E)listenerOrNull);
  }
}

@ SuppressWarnings ( "unchecked" ) private void readObject ( ObjectInputStream s ) throws ClassNotFoundException , IOException { s . defaultReadObject ( ) ; Object listenerOrNull ; while ( null != ( listenerOrNull = s . readObject ( ) ) ) { add ( ( E ) listenerOrNull ) ; } }
read the listeners from a stream .
