Class ActorDTO.Builder
- java.lang.Object
-
- com.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.ActorDTO.Builder
-
- Enclosing class:
- ActorDTO
public static class ActorDTO.Builder extends Object
Builder used to create a new immutableActorDTOimplementation
This builder provides a fluent API for setting certain object properties and creating a new immutableActorDTOinstance 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 ActorDTObuild()Builds a newActorDTO.ActorDTO.Builderfrom(Actor instance)Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Actorinstance.ActorDTO.Builderfrom(ActorDTO instance)Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.ActorDTOinstance.ActorDTO.Builderid(Long id)Initializes the value for theidattribute.ActorDTO.Builderimage(String image)Initializes the value for theimageattribute.ActorDTO.BuilderimageAdded(String imageAdded)Initializes the value for theimageAddedattribute.ActorDTO.BuilderimageAuthor(Long imageAuthor)Initializes the value for theimageAuthorattribute.ActorDTO.BuilderlastUpdated(String lastUpdated)Initializes the value for thelastUpdatedattribute.ActorDTO.Buildername(String name)Initializes the value for thenameattribute.ActorDTO.Builderrole(String role)Initializes the value for theroleattribute.ActorDTO.BuilderseriesId(Long seriesId)Initializes the value for theseriesIdattribute.ActorDTO.BuildersortOrder(Long sortOrder)Initializes the value for thesortOrderattribute.
-
-
-
Method Detail
-
from
public final ActorDTO.Builder from(Actor instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Actorinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final ActorDTO.Builder from(ActorDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.ActorDTOinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
id
public final ActorDTO.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 ActorDTO.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
-
imageAdded
public final ActorDTO.Builder imageAdded(@Nullable String imageAdded)
Initializes the value for theimageAddedattribute.- Parameters:
imageAdded- The value for imageAdded (can benull)- Returns:
thisbuilder for use in a chained invocation
-
imageAuthor
public final ActorDTO.Builder imageAuthor(@Nullable Long imageAuthor)
Initializes the value for theimageAuthorattribute.- Parameters:
imageAuthor- The value for imageAuthor (can benull)- Returns:
thisbuilder for use in a chained invocation
-
lastUpdated
public final ActorDTO.Builder lastUpdated(@Nullable String lastUpdated)
Initializes the value for thelastUpdatedattribute.- Parameters:
lastUpdated- The value for lastUpdated (can benull)- Returns:
thisbuilder for use in a chained invocation
-
name
public final ActorDTO.Builder name(@Nullable String name)
Initializes the value for thenameattribute.- Parameters:
name- The value for name (can benull)- Returns:
thisbuilder for use in a chained invocation
-
role
public final ActorDTO.Builder role(@Nullable String role)
Initializes the value for theroleattribute.- Parameters:
role- The value for role (can benull)- Returns:
thisbuilder for use in a chained invocation
-
seriesId
public final ActorDTO.Builder seriesId(@Nullable Long seriesId)
Initializes the value for theseriesIdattribute.- Parameters:
seriesId- The value for seriesId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
sortOrder
public final ActorDTO.Builder sortOrder(@Nullable Long sortOrder)
Initializes the value for thesortOrderattribute.- Parameters:
sortOrder- The value for sortOrder (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ActorDTO build()
Builds a newActorDTO.- Returns:
- An immutable instance of ActorDTO
- Throws:
IllegalStateException- if any required attributes are missing
-
-