1 16 17 package org.apache.commons.betwixt.io; 18 19 import java.util.ArrayList ; 20 import java.util.Collection ; 21 import java.util.Iterator ; 22 23 27 public class MovieBean { 28 29 private String name; 30 private int year; 31 private PersonBean director; 32 private Collection actors = new ArrayList (); 33 34 public MovieBean() {} 35 public MovieBean(String name, int year, PersonBean director) { 36 setName(name); 37 setYear(year); 38 setDirector(director); 39 } 40 41 public Iterator getActors() { 42 return actors.iterator(); 43 } 44 45 public PersonBean getDirector() { 46 return director; 47 } 48 49 public String getName() { 50 return name; 51 } 52 53 54 public int getYear() { 55 return year; 56 } 57 58 public void addActor(PersonBean actor) { 59 actors.add(actor); 60 } 61 62 public void setDirector(PersonBean bean) { 63 director = bean; 64 } 65 66 public void setName(String string) { 67 name = string; 68 } 69 70 71 public void setYear(int i) { 72 year = i; 73 } 74 75 } 76 | Popular Tags |