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 immutableSeriesDTO
implementation
This builder provides a fluent API for setting certain object properties and creating a new immutableSeriesDTO
instance 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.Builder
addAliases(String element)
Adds one element toaliases
list.SeriesDTO.Builder
addAliases(String... elements)
Adds elements toaliases
list.SeriesDTO.Builder
addAllAliases(Iterable<String> elements)
Adds elements toaliases
list.SeriesDTO.Builder
addAllGenre(Iterable<String> elements)
Adds elements togenre
list.SeriesDTO.Builder
added(String added)
Initializes the value for theadded
attribute.SeriesDTO.Builder
addGenre(String element)
Adds one element togenre
list.SeriesDTO.Builder
addGenre(String... elements)
Adds elements togenre
list.SeriesDTO.Builder
airsDayOfWeek(String airsDayOfWeek)
Initializes the value for theairsDayOfWeek
attribute.SeriesDTO.Builder
airsTime(String airsTime)
Initializes the value for theairsTime
attribute.SeriesDTO.Builder
aliases(Iterable<String> elements)
Sets or replaces all elements foraliases
list.SeriesDTO.Builder
banner(String banner)
Initializes the value for thebanner
attribute.SeriesDTO
build()
Builds a newSeriesDTO
.SeriesDTO.Builder
firstAired(String firstAired)
Initializes the value for thefirstAired
attribute.SeriesDTO.Builder
from(Series instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Series
instance.SeriesDTO.Builder
from(SeriesSearchResult instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.SeriesSearchResult
instance.SeriesDTO.Builder
from(SeriesDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.SeriesDTO
instance.SeriesDTO.Builder
genre(Iterable<String> elements)
Sets or replaces all elements forgenre
list.SeriesDTO.Builder
id(Long id)
Initializes the value for theid
attribute.SeriesDTO.Builder
image(String image)
Initializes the value for theimage
attribute.SeriesDTO.Builder
imdbId(String imdbId)
Initializes the value for theimdbId
attribute.SeriesDTO.Builder
lastUpdated(Long lastUpdated)
Initializes the value for thelastUpdated
attribute.SeriesDTO.Builder
network(String network)
Initializes the value for thenetwork
attribute.SeriesDTO.Builder
networkId(String networkId)
Initializes the value for thenetworkId
attribute.SeriesDTO.Builder
overview(String overview)
Initializes the value for theoverview
attribute.SeriesDTO.Builder
poster(String poster)
Initializes the value for theposter
attribute.SeriesDTO.Builder
rating(String rating)
Initializes the value for therating
attribute.SeriesDTO.Builder
runtime(String runtime)
Initializes the value for theruntime
attribute.SeriesDTO.Builder
seriesId(String seriesId)
Initializes the value for theseriesId
attribute.SeriesDTO.Builder
seriesName(String seriesName)
Initializes the value for theseriesName
attribute.SeriesDTO.Builder
siteRating(Double siteRating)
Initializes the value for thesiteRating
attribute.SeriesDTO.Builder
siteRatingCount(Long siteRatingCount)
Initializes the value for thesiteRatingCount
attribute.SeriesDTO.Builder
slug(String slug)
Initializes the value for theslug
attribute.SeriesDTO.Builder
status(String status)
Initializes the value for thestatus
attribute.SeriesDTO.Builder
zap2itId(String zap2itId)
Initializes the value for thezap2itId
attribute.
-
-
-
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.SeriesSearchResult
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder 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.Series
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder 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.SeriesDTO
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
addAliases
public final SeriesDTO.Builder addAliases(String element)
Adds one element toaliases
list.- Parameters:
element
- A aliases element- Returns:
this
builder for use in a chained invocation
-
addAliases
public final SeriesDTO.Builder addAliases(String... elements)
Adds elements toaliases
list.- Parameters:
elements
- An array of aliases elements- Returns:
this
builder for use in a chained invocation
-
aliases
public final SeriesDTO.Builder aliases(Iterable<String> elements)
Sets or replaces all elements foraliases
list.- Parameters:
elements
- An iterable of aliases elements- Returns:
this
builder for use in a chained invocation
-
addAllAliases
public final SeriesDTO.Builder addAllAliases(Iterable<String> elements)
Adds elements toaliases
list.- Parameters:
elements
- An iterable of aliases elements- Returns:
this
builder for use in a chained invocation
-
banner
public final SeriesDTO.Builder banner(@Nullable String banner)
Initializes the value for thebanner
attribute.- Parameters:
banner
- The value for banner (can benull
)- Returns:
this
builder for use in a chained invocation
-
firstAired
public final SeriesDTO.Builder firstAired(@Nullable String firstAired)
Initializes the value for thefirstAired
attribute.- Parameters:
firstAired
- The value for firstAired (can benull
)- Returns:
this
builder for use in a chained invocation
-
id
public final SeriesDTO.Builder id(@Nullable Long id)
Initializes the value for theid
attribute.- Parameters:
id
- The value for id (can benull
)- Returns:
this
builder for use in a chained invocation
-
image
public final SeriesDTO.Builder image(@Nullable String image)
Initializes the value for theimage
attribute.- Parameters:
image
- The value for image (can benull
)- Returns:
this
builder for use in a chained invocation
-
network
public final SeriesDTO.Builder network(@Nullable String network)
Initializes the value for thenetwork
attribute.- Parameters:
network
- The value for network (can benull
)- Returns:
this
builder for use in a chained invocation
-
overview
public final SeriesDTO.Builder overview(@Nullable String overview)
Initializes the value for theoverview
attribute.- Parameters:
overview
- The value for overview (can benull
)- Returns:
this
builder for use in a chained invocation
-
poster
public final SeriesDTO.Builder poster(@Nullable String poster)
Initializes the value for theposter
attribute.- Parameters:
poster
- The value for poster (can benull
)- Returns:
this
builder for use in a chained invocation
-
seriesName
public final SeriesDTO.Builder seriesName(@Nullable String seriesName)
Initializes the value for theseriesName
attribute.- Parameters:
seriesName
- The value for seriesName (can benull
)- Returns:
this
builder for use in a chained invocation
-
slug
public final SeriesDTO.Builder slug(@Nullable String slug)
Initializes the value for theslug
attribute.- Parameters:
slug
- The value for slug (can benull
)- Returns:
this
builder for use in a chained invocation
-
status
public final SeriesDTO.Builder status(@Nullable String status)
Initializes the value for thestatus
attribute.- Parameters:
status
- The value for status (can benull
)- Returns:
this
builder for use in a chained invocation
-
added
public final SeriesDTO.Builder added(@Nullable String added)
Initializes the value for theadded
attribute.- Parameters:
added
- The value for added (can benull
)- Returns:
this
builder for use in a chained invocation
-
airsDayOfWeek
public final SeriesDTO.Builder airsDayOfWeek(@Nullable String airsDayOfWeek)
Initializes the value for theairsDayOfWeek
attribute.- Parameters:
airsDayOfWeek
- The value for airsDayOfWeek (can benull
)- Returns:
this
builder for use in a chained invocation
-
airsTime
public final SeriesDTO.Builder airsTime(@Nullable String airsTime)
Initializes the value for theairsTime
attribute.- Parameters:
airsTime
- The value for airsTime (can benull
)- Returns:
this
builder for use in a chained invocation
-
addGenre
public final SeriesDTO.Builder addGenre(String element)
Adds one element togenre
list.- Parameters:
element
- A genre element- Returns:
this
builder for use in a chained invocation
-
addGenre
public final SeriesDTO.Builder addGenre(String... elements)
Adds elements togenre
list.- Parameters:
elements
- An array of genre elements- Returns:
this
builder for use in a chained invocation
-
genre
public final SeriesDTO.Builder genre(Iterable<String> elements)
Sets or replaces all elements forgenre
list.- Parameters:
elements
- An iterable of genre elements- Returns:
this
builder for use in a chained invocation
-
addAllGenre
public final SeriesDTO.Builder addAllGenre(Iterable<String> elements)
Adds elements togenre
list.- Parameters:
elements
- An iterable of genre elements- Returns:
this
builder for use in a chained invocation
-
imdbId
public final SeriesDTO.Builder imdbId(@Nullable String imdbId)
Initializes the value for theimdbId
attribute.- Parameters:
imdbId
- The value for imdbId (can benull
)- Returns:
this
builder for use in a chained invocation
-
lastUpdated
public final SeriesDTO.Builder lastUpdated(@Nullable Long lastUpdated)
Initializes the value for thelastUpdated
attribute.- Parameters:
lastUpdated
- The value for lastUpdated (can benull
)- Returns:
this
builder for use in a chained invocation
-
networkId
public final SeriesDTO.Builder networkId(@Nullable String networkId)
Initializes the value for thenetworkId
attribute.- Parameters:
networkId
- The value for networkId (can benull
)- Returns:
this
builder for use in a chained invocation
-
rating
public final SeriesDTO.Builder rating(@Nullable String rating)
Initializes the value for therating
attribute.- Parameters:
rating
- The value for rating (can benull
)- Returns:
this
builder for use in a chained invocation
-
runtime
public final SeriesDTO.Builder runtime(@Nullable String runtime)
Initializes the value for theruntime
attribute.- Parameters:
runtime
- The value for runtime (can benull
)- Returns:
this
builder for use in a chained invocation
-
seriesId
public final SeriesDTO.Builder seriesId(@Nullable String seriesId)
Initializes the value for theseriesId
attribute.- Parameters:
seriesId
- The value for seriesId (can benull
)- Returns:
this
builder for use in a chained invocation
-
siteRating
public final SeriesDTO.Builder siteRating(@Nullable Double siteRating)
Initializes the value for thesiteRating
attribute.- Parameters:
siteRating
- The value for siteRating (can benull
)- Returns:
this
builder for use in a chained invocation
-
siteRatingCount
public final SeriesDTO.Builder siteRatingCount(@Nullable Long siteRatingCount)
Initializes the value for thesiteRatingCount
attribute.- Parameters:
siteRatingCount
- The value for siteRatingCount (can benull
)- Returns:
this
builder for use in a chained invocation
-
zap2itId
public final SeriesDTO.Builder zap2itId(@Nullable String zap2itId)
Initializes the value for thezap2itId
attribute.- Parameters:
zap2itId
- The value for zap2itId (can benull
)- Returns:
this
builder 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
-
-