public class Movie
extends java.lang.Object
Constructor | Description |
---|---|
Movie(java.lang.String title,
int year,
java.util.List<java.lang.String> actors) |
Adds basic information for a Movie.
|
Movie(java.lang.String title,
int year,
java.util.List<java.lang.String> actors,
java.util.List<java.lang.String> genres,
Rating rating,
java.util.List<KeyWord> keywords) |
Constructor includes basic information + genres, rating and keywords.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object o) |
IF YOU HAVEN'T LOOKED AT THE IMPLEMENTATION GUIDELINES LINKED IN THE MAIN RECITATION
Compare Movie Objects.
|
static boolean |
equalsIgnoresOrder(java.util.List<java.lang.String> one,
java.util.List<java.lang.String> two) |
Helper method to compare lists.
|
java.util.List<java.lang.String> |
getActors() |
Getter method to return the corresponding member variable.
|
java.util.List<java.lang.String> |
getGenres() |
Getter method to return the corresponding member variable.
|
java.util.List<KeyWord> |
getKeyWords() |
Getter method to return the corresponding member variable.
|
Rating |
getRating() |
Getter method to return the corresponding member variable.
|
java.lang.String |
getTitle() |
Getter method to return the corresponding member variable.
|
int |
getYear() |
Getter method to return the corresponding member variable.
|
int |
hashCode() |
When you override the equals method, you should override the hashCode.
|
static void |
main(java.lang.String[] args) |
|
java.lang.String |
toString() |
String that describes the title, release year, and actors (5 per line).
|
public Movie(java.lang.String title, int year, java.util.List<java.lang.String> actors)
Collections.unmodifiableList(List)
to make sure actors
cannot be changed.title
- The title of the movieyear
- The year the movie was producedactors
- The actors in the moviepublic Movie(java.lang.String title, int year, java.util.List<java.lang.String> actors, java.util.List<java.lang.String> genres, Rating rating, java.util.List<KeyWord> keywords)
title
- The title of the movieyear
- The year the movie was releasedactors
- The actors in the moviegenres
- The genre or genres of the movierating
- The RottonTomatoes rating for the moviekeywords
- A list of descriptive keywordsMovie(String, int, List)
public java.lang.String getTitle()
public int getYear()
public java.util.List<java.lang.String> getActors()
public java.util.List<java.lang.String> getGenres()
public Rating getRating()
public java.util.List<KeyWord> getKeyWords()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The Object you are comparing equality toequalsIgnoresOrder(List, List)
public static boolean equalsIgnoresOrder(java.util.List<java.lang.String> one, java.util.List<java.lang.String> two)
one
- first listtwo
- second listpublic int hashCode()
hashCode
in class java.lang.Object
public static void main(java.lang.String[] args)