@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Movie)) return false;

        Movie movie = (Movie) o;

        if (rates != movie.rates) return false;
        if (!director.equals(movie.director)) return false;
        if (!name.equals(movie.name)) return false;
        if (!year.equals(movie.year)) return false;

        return true;
    }