FileDocCategorySizeDatePackage
Movie.javaAPI DocExample1737Fri Oct 25 19:41:50 BST 2002com.mediamania.prototype

Movie

public class Movie extends Object

Fields Summary
private static SimpleDateFormat
yearFmt
public static final String[]
MPAAratings
private String
title
private Date
releaseDate
private int
runningTime
private String
rating
private String
webSite
private String
genres
private Set
cast
Constructors Summary
private Movie()

    // element type: Role

 
 
public Movie(String title, Date release, int duration, String rating, String genres)

    this.title = title;
    releaseDate = release;
    runningTime = duration;
    this.rating = rating;
    this.genres = genres;
    cast = new HashSet();
Methods Summary
public voidaddRole(Role role)

    cast.add(role);
public java.lang.StringformatReleaseDate()

    return yearFmt.format(releaseDate);
public java.util.SetgetCast()

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

    return genres;
public java.lang.StringgetRating()

    return rating;
public java.util.DategetReleaseDate()

    return releaseDate;
public intgetRunningTime()

    return runningTime;
public java.lang.StringgetTitle()

    return title;
public java.lang.StringgetWebSite()

    return webSite;
public static java.util.DateparseReleaseDate(java.lang.String val)

    Date date = null;
    try {
        date = yearFmt.parse(val);
    } catch(java.text.ParseException exc){ }
    return date;
public voidsetWebSite(java.lang.String site)

    webSite = site;