java.lang.Object
cs1302.oracle.model.Movie.Order
- Enclosing class:
- Movie
Implementations of
Comparable<Movie> that
impose various orderings.-
Method Summary
Modifier and TypeMethodDescriptionstatic <R extends Comparable<? super R>>
Comparator<Movie>by(Movie.Mapper<R> mapper) Returns a comparator forMovieobjects that performs comparisons using the natural ordering of the results of applying the givenmapperfunction to the person objects under comparison.static Comparator<Movie>byName()Returns a comparator forMovieobjects that performs comparisons using the natural ordering of the name values of the movie objects under comparison.static Comparator<Movie>byRating()Returns a comparator forMovieobjects that performs comparisons using the natural ordering of the rating values of the movie objects under comparison.static Comparator<Movie>Returns a comparator forMovieobjects that performs comparisons using the natural ordering of the runtime values of the movie objects under comparison.static Comparator<Movie>Returns a comparator forMovieobjects that performs comparisons using the natural ordering of the tagline values of the movie objects under comparison.static Comparator<Movie>byYear()Returns a comparator forMovieobjects that performs comparisons using the natural ordering of the year values of the movie objects under comparison.
-
Method Details
-
by
Returns a comparator forMovieobjects that performs comparisons using the natural ordering of the results of applying the givenmapperfunction to the person objects under comparison.- Type Parameters:
R- the return type ofmapper.apply(Movie)- Parameters:
mapper- a function that returns a comparable value for a person- Returns:
- a comparator for
Movieobjects
-
byName
Returns a comparator forMovieobjects that performs comparisons using the natural ordering of the name values of the movie objects under comparison.- Returns:
- a comparator that compares
Movieobjects by name
-
byRating
Returns a comparator forMovieobjects that performs comparisons using the natural ordering of the rating values of the movie objects under comparison.- Returns:
- a comparator that compares
Movieobjects by rating
-
byRuntime
Returns a comparator forMovieobjects that performs comparisons using the natural ordering of the runtime values of the movie objects under comparison.- Returns:
- a comparator that compares
Movieobjects by runtime
-
byTagline
Returns a comparator forMovieobjects that performs comparisons using the natural ordering of the tagline values of the movie objects under comparison.- Returns:
- a comparator that compares
Movieobjects by tagline
-
byYear
Returns a comparator forMovieobjects that performs comparisons using the natural ordering of the year values of the movie objects under comparison.- Returns:
- a comparator that compares
Movieobjects by year
-