FileDocCategorySizeDatePackage
Movie.javaAPI DocExample1806Thu Dec 26 11:01:36 GMT 2002com.mediamania.content

Movie

public class Movie extends MediaContent

Fields Summary
private static String[]
allRatings
private String
genres
private Set
cast
private MediaPerson
director
private int
runningTime
private String
webSite
Constructors Summary
private Movie()


     
     
public Movie(String title, Studio studio, Date releaseDate, String rating, String reasons, String genres, int runningTime, MediaPerson director)

 
        super(title, studio, releaseDate, rating, reasons);
        this.runningTime = runningTime;
        this.genres = genres;
        cast = new HashSet();
        this.director = director;
        if (director != null) director.addMoviesDirected(this);
    
Methods Summary
public voidaddRole(Role r)

        cast.add(r);
    
public java.util.SetgetCast()

        return Collections.unmodifiableSet(cast);
    
public java.lang.StringgetDescription()

        StringBuffer buffer = new StringBuffer();
        buffer.append("Movie: ");
        buffer.append(super.getDescription());
        buffer.append(", genre: ");
        buffer.append(genres);
        buffer.append(" running time: ");
        buffer.append(runningTime);
        return buffer.toString();
    
public MediaPersongetDirector()

        return director;
    
public voidremoveRole(Role r)

        cast.remove(r);
    
public booleanvalidRating(java.lang.String rating)

        for (int i = 0; i < allRatings.length; ++i) {
            if (rating.equals(allRatings[i])) return true;
        }
        return false;