Interface CreditsResponse<C,R>

Type Parameters:
C - cast credit type
R - 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 Type
    Method
    Description
    Returns the cast credits contained in the response.
    default int
    Returns the number of cast credits.
    default int
    Returns the total number of cast and crew credits.
    Returns the crew credits contained in the response.
    default int
    Returns the number of crew credits.
    default boolean
    Returns whether the response contains at least one cast credit.
    default boolean
    Returns whether the response contains at least one cast or crew credit.
    default boolean
    Returns whether the response contains at least one crew credit.
    default boolean
    Returns whether the response contains no cast and no crew credits.
  • Method Details

    • cast

      List<C> cast()
      Returns the cast credits contained in the response.
      Returns:
      immutable list of cast credits
    • crew

      List<R> 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:
      true if cast and crew are empty
    • hasCast

      default boolean hasCast()
      Returns whether the response contains at least one cast credit.
      Returns:
      true if cast credits are present
    • hasCrew

      default boolean hasCrew()
      Returns whether the response contains at least one crew credit.
      Returns:
      true if crew credits are present
    • hasCredits

      default boolean hasCredits()
      Returns whether the response contains at least one cast or crew credit.
      Returns:
      true if 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