Package dev.reuss.tmdb.common.credit
Interface CreditsResponse<C,R>
- Type Parameters:
C- cast credit typeR- crew credit type
- All Known Implementing Classes:
MovieCredits,PersonCombinedCredits,PersonMovieCredits,PersonTvCredits,TvEpisodeCredits,TvSeasonCredits,TvSeriesCredits
public interface CreditsResponse<C,R>
Common contract for TMDB responses that contain cast and crew credits.
-
Method Summary
Modifier and TypeMethodDescriptioncast()Returns the cast credits contained in the response.default intReturns the number of cast credits.default intReturns the total number of cast and crew credits.crew()Returns the crew credits contained in the response.default intReturns the number of crew credits.default booleanhasCast()Returns whether the response contains at least one cast credit.default booleanReturns whether the response contains at least one cast or crew credit.default booleanhasCrew()Returns whether the response contains at least one crew credit.default booleanisEmpty()Returns whether the response contains no cast and no crew credits.
-
Method Details
-
cast
Returns the cast credits contained in the response.- Returns:
- immutable list of cast credits
-
crew
Returns the crew credits contained in the response.- Returns:
- immutable list of crew credits
-
isEmpty
default boolean isEmpty()Returns whether the response contains no cast and no crew credits.- Returns:
trueif cast and crew are empty
-
hasCast
default boolean hasCast()Returns whether the response contains at least one cast credit.- Returns:
trueif cast credits are present
-
hasCrew
default boolean hasCrew()Returns whether the response contains at least one crew credit.- Returns:
trueif crew credits are present
-
hasCredits
default boolean hasCredits()Returns whether the response contains at least one cast or crew credit.- Returns:
trueif credits are present
-
castCount
default int castCount()Returns the number of cast credits.- Returns:
- cast count
-
crewCount
default int crewCount()Returns the number of crew credits.- Returns:
- crew count
-
creditCount
default int creditCount()Returns the total number of cast and crew credits.- Returns:
- total credit count
-