Esempio n. 1
0
 public void atualizarTime(Time time) throws TimeNaoEncontradoException, IllegalArgumentException {
   Time t;
   int index;
   if (time != null) {
     t = repositorioTime.retornarTime(time.getUsuario());
     index = repositorioTime.procurarIndice(time);
   } else {
     throw new IllegalArgumentException();
   }
   if (index != -1 && t != null) {
     repositorioTime.atualizarTime(t, index);
   } else {
     throw new TimeNaoEncontradoException();
   }
 }