Exemplo n.º 1
0
  public static Actor findActorInFilm(Collection<Film> films, String film, String actorName) {
    Film foundedFilm = Film.findFilmInCollection(films, film);
    Iterator<Actor> itActor = foundedFilm.getActors().iterator();
    Actor foundedActor = new Actor();
    while (itActor.hasNext()) {
      Actor a = itActor.next();
      if (actorName.equals(a.getActorName())) {
        foundedActor = a;
        System.out.println("I found this actor");

      } else {
        System.out.println("I didn't find this actor");
      }
    }
    return foundedActor;
  }
Exemplo n.º 2
0
 public static void delActor(Collection<Film> films, String film, Actor actor) {
   Film foundedFilm = Film.findFilmInCollection(films, film);
   // foundedFilm.getActors().remove(foundedActor);
   foundedFilm.getActors().remove(actor);
 }