Class SeriesDTO.Builder
- java.lang.Object
-
- com.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.SeriesDTO.Builder
-
- Enclosing class:
- SeriesDTO
public static class SeriesDTO.Builder extends Object
Builder used to create a new immutableSeriesDTOimplementation
This builder provides a fluent API for setting certain object properties and creating a new immutableSeriesDTOinstance based on these properties. New builders may be initialized with some existing DTO instance, which presets the builders properties to the values of the given DTO, still retaining the option to make additional changes before actually building a new immutable object.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SeriesDTO.BuilderaddAliases(String element)Adds one element toaliaseslist.SeriesDTO.BuilderaddAliases(String... elements)Adds elements toaliaseslist.SeriesDTO.BuilderaddAllAliases(Iterable<String> elements)Adds elements toaliaseslist.SeriesDTO.BuilderaddAllGenre(Iterable<String> elements)Adds elements togenrelist.SeriesDTO.Builderadded(String added)Initializes the value for theaddedattribute.SeriesDTO.BuilderaddGenre(String element)Adds one element togenrelist.SeriesDTO.BuilderaddGenre(String... elements)Adds elements togenrelist.SeriesDTO.BuilderairsDayOfWeek(String airsDayOfWeek)Initializes the value for theairsDayOfWeekattribute.SeriesDTO.BuilderairsTime(String airsTime)Initializes the value for theairsTimeattribute.SeriesDTO.Builderaliases(Iterable<String> elements)Sets or replaces all elements foraliaseslist.SeriesDTO.Builderbanner(String banner)Initializes the value for thebannerattribute.SeriesDTObuild()Builds a newSeriesDTO.SeriesDTO.BuilderfirstAired(String firstAired)Initializes the value for thefirstAiredattribute.SeriesDTO.Builderfrom(Series instance)Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Seriesinstance.SeriesDTO.Builderfrom(SeriesSearchResult instance)Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.SeriesSearchResultinstance.SeriesDTO.Builderfrom(SeriesDTO instance)Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.SeriesDTOinstance.SeriesDTO.Buildergenre(Iterable<String> elements)Sets or replaces all elements forgenrelist.SeriesDTO.Builderid(Long id)Initializes the value for theidattribute.SeriesDTO.Builderimage(String image)Initializes the value for theimageattribute.SeriesDTO.BuilderimdbId(String imdbId)Initializes the value for theimdbIdattribute.SeriesDTO.BuilderlastUpdated(Long lastUpdated)Initializes the value for thelastUpdatedattribute.SeriesDTO.Buildernetwork(String network)Initializes the value for thenetworkattribute.SeriesDTO.BuildernetworkId(String networkId)Initializes the value for thenetworkIdattribute.SeriesDTO.Builderoverview(String overview)Initializes the value for theoverviewattribute.SeriesDTO.Builderposter(String poster)Initializes the value for theposterattribute.SeriesDTO.Builderrating(String rating)Initializes the value for theratingattribute.SeriesDTO.Builderruntime(String runtime)Initializes the value for theruntimeattribute.SeriesDTO.BuilderseriesId(String seriesId)Initializes the value for theseriesIdattribute.SeriesDTO.BuilderseriesName(String seriesName)Initializes the value for theseriesNameattribute.SeriesDTO.BuildersiteRating(Double siteRating)Initializes the value for thesiteRatingattribute.SeriesDTO.BuildersiteRatingCount(Long siteRatingCount)Initializes the value for thesiteRatingCountattribute.SeriesDTO.Builderslug(String slug)Initializes the value for theslugattribute.SeriesDTO.Builderstatus(String status)Initializes the value for thestatusattribute.SeriesDTO.Builderzap2itId(String zap2itId)Initializes the value for thezap2itIdattribute.
-
-
-
Method Detail
-
from
public final SeriesDTO.Builder from(SeriesSearchResult instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.SeriesSearchResultinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final SeriesDTO.Builder from(Series instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Seriesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final SeriesDTO.Builder from(SeriesDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.SeriesDTOinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addAliases
public final SeriesDTO.Builder addAliases(String element)
Adds one element toaliaseslist.- Parameters:
element- A aliases element- Returns:
thisbuilder for use in a chained invocation
-
addAliases
public final SeriesDTO.Builder addAliases(String... elements)
Adds elements toaliaseslist.- Parameters:
elements- An array of aliases elements- Returns:
thisbuilder for use in a chained invocation
-
aliases
public final SeriesDTO.Builder aliases(Iterable<String> elements)
Sets or replaces all elements foraliaseslist.- Parameters:
elements- An iterable of aliases elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAliases
public final SeriesDTO.Builder addAllAliases(Iterable<String> elements)
Adds elements toaliaseslist.- Parameters:
elements- An iterable of aliases elements- Returns:
thisbuilder for use in a chained invocation
-
banner
public final SeriesDTO.Builder banner(@Nullable String banner)
Initializes the value for thebannerattribute.- Parameters:
banner- The value for banner (can benull)- Returns:
thisbuilder for use in a chained invocation
-
firstAired
public final SeriesDTO.Builder firstAired(@Nullable String firstAired)
Initializes the value for thefirstAiredattribute.- Parameters:
firstAired- The value for firstAired (can benull)- Returns:
thisbuilder for use in a chained invocation
-
id
public final SeriesDTO.Builder id(@Nullable Long id)
Initializes the value for theidattribute.- Parameters:
id- The value for id (can benull)- Returns:
thisbuilder for use in a chained invocation
-
image
public final SeriesDTO.Builder image(@Nullable String image)
Initializes the value for theimageattribute.- Parameters:
image- The value for image (can benull)- Returns:
thisbuilder for use in a chained invocation
-
network
public final SeriesDTO.Builder network(@Nullable String network)
Initializes the value for thenetworkattribute.- Parameters:
network- The value for network (can benull)- Returns:
thisbuilder for use in a chained invocation
-
overview
public final SeriesDTO.Builder overview(@Nullable String overview)
Initializes the value for theoverviewattribute.- Parameters:
overview- The value for overview (can benull)- Returns:
thisbuilder for use in a chained invocation
-
poster
public final SeriesDTO.Builder poster(@Nullable String poster)
Initializes the value for theposterattribute.- Parameters:
poster- The value for poster (can benull)- Returns:
thisbuilder for use in a chained invocation
-
seriesName
public final SeriesDTO.Builder seriesName(@Nullable String seriesName)
Initializes the value for theseriesNameattribute.- Parameters:
seriesName- The value for seriesName (can benull)- Returns:
thisbuilder for use in a chained invocation
-
slug
public final SeriesDTO.Builder slug(@Nullable String slug)
Initializes the value for theslugattribute.- Parameters:
slug- The value for slug (can benull)- Returns:
thisbuilder for use in a chained invocation
-
status
public final SeriesDTO.Builder status(@Nullable String status)
Initializes the value for thestatusattribute.- Parameters:
status- The value for status (can benull)- Returns:
thisbuilder for use in a chained invocation
-
added
public final SeriesDTO.Builder added(@Nullable String added)
Initializes the value for theaddedattribute.- Parameters:
added- The value for added (can benull)- Returns:
thisbuilder for use in a chained invocation
-
airsDayOfWeek
public final SeriesDTO.Builder airsDayOfWeek(@Nullable String airsDayOfWeek)
Initializes the value for theairsDayOfWeekattribute.- Parameters:
airsDayOfWeek- The value for airsDayOfWeek (can benull)- Returns:
thisbuilder for use in a chained invocation
-
airsTime
public final SeriesDTO.Builder airsTime(@Nullable String airsTime)
Initializes the value for theairsTimeattribute.- Parameters:
airsTime- The value for airsTime (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addGenre
public final SeriesDTO.Builder addGenre(String element)
Adds one element togenrelist.- Parameters:
element- A genre element- Returns:
thisbuilder for use in a chained invocation
-
addGenre
public final SeriesDTO.Builder addGenre(String... elements)
Adds elements togenrelist.- Parameters:
elements- An array of genre elements- Returns:
thisbuilder for use in a chained invocation
-
genre
public final SeriesDTO.Builder genre(Iterable<String> elements)
Sets or replaces all elements forgenrelist.- Parameters:
elements- An iterable of genre elements- Returns:
thisbuilder for use in a chained invocation
-
addAllGenre
public final SeriesDTO.Builder addAllGenre(Iterable<String> elements)
Adds elements togenrelist.- Parameters:
elements- An iterable of genre elements- Returns:
thisbuilder for use in a chained invocation
-
imdbId
public final SeriesDTO.Builder imdbId(@Nullable String imdbId)
Initializes the value for theimdbIdattribute.- Parameters:
imdbId- The value for imdbId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
lastUpdated
public final SeriesDTO.Builder lastUpdated(@Nullable Long lastUpdated)
Initializes the value for thelastUpdatedattribute.- Parameters:
lastUpdated- The value for lastUpdated (can benull)- Returns:
thisbuilder for use in a chained invocation
-
networkId
public final SeriesDTO.Builder networkId(@Nullable String networkId)
Initializes the value for thenetworkIdattribute.- Parameters:
networkId- The value for networkId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
rating
public final SeriesDTO.Builder rating(@Nullable String rating)
Initializes the value for theratingattribute.- Parameters:
rating- The value for rating (can benull)- Returns:
thisbuilder for use in a chained invocation
-
runtime
public final SeriesDTO.Builder runtime(@Nullable String runtime)
Initializes the value for theruntimeattribute.- Parameters:
runtime- The value for runtime (can benull)- Returns:
thisbuilder for use in a chained invocation
-
seriesId
public final SeriesDTO.Builder seriesId(@Nullable String seriesId)
Initializes the value for theseriesIdattribute.- Parameters:
seriesId- The value for seriesId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
siteRating
public final SeriesDTO.Builder siteRating(@Nullable Double siteRating)
Initializes the value for thesiteRatingattribute.- Parameters:
siteRating- The value for siteRating (can benull)- Returns:
thisbuilder for use in a chained invocation
-
siteRatingCount
public final SeriesDTO.Builder siteRatingCount(@Nullable Long siteRatingCount)
Initializes the value for thesiteRatingCountattribute.- Parameters:
siteRatingCount- The value for siteRatingCount (can benull)- Returns:
thisbuilder for use in a chained invocation
-
zap2itId
public final SeriesDTO.Builder zap2itId(@Nullable String zap2itId)
Initializes the value for thezap2itIdattribute.- Parameters:
zap2itId- The value for zap2itId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public SeriesDTO build()
Builds a newSeriesDTO.- Returns:
- An immutable instance of SeriesDTO
- Throws:
IllegalStateException- if any required attributes are missing
-
-