public void addListener(final TrainerListener trainerListener){
  if (listeners == null) {
    listeners=new ArrayList<TrainerListener>();
  }
  listeners.add(trainerListener);
}

public void addListener ( final TrainerListener trainerListener ) { if ( listeners == null ) { listeners = new ArrayList < TrainerListener > ( ) ; } listeners . add ( trainerListener ) ; }
add a trainer listener .
