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 immutableActorDTO
implementation
This builder provides a fluent API for setting certain object properties and creating a new immutableActorDTO
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 ActorDTO
build()
Builds a newActorDTO
.ActorDTO.Builder
from(Actor instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Actor
instance.ActorDTO.Builder
from(ActorDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.ActorDTO
instance.ActorDTO.Builder
id(Long id)
Initializes the value for theid
attribute.ActorDTO.Builder
image(String image)
Initializes the value for theimage
attribute.ActorDTO.Builder
imageAdded(String imageAdded)
Initializes the value for theimageAdded
attribute.ActorDTO.Builder
imageAuthor(Long imageAuthor)
Initializes the value for theimageAuthor
attribute.ActorDTO.Builder
lastUpdated(String lastUpdated)
Initializes the value for thelastUpdated
attribute.ActorDTO.Builder
name(String name)
Initializes the value for thename
attribute.ActorDTO.Builder
role(String role)
Initializes the value for therole
attribute.ActorDTO.Builder
seriesId(Long seriesId)
Initializes the value for theseriesId
attribute.ActorDTO.Builder
sortOrder(Long sortOrder)
Initializes the value for thesortOrder
attribute.
-
-
-
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.Actor
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder 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.ActorDTO
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
id
public final ActorDTO.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 ActorDTO.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
-
imageAdded
public final ActorDTO.Builder imageAdded(@Nullable String imageAdded)
Initializes the value for theimageAdded
attribute.- Parameters:
imageAdded
- The value for imageAdded (can benull
)- Returns:
this
builder for use in a chained invocation
-
imageAuthor
public final ActorDTO.Builder imageAuthor(@Nullable Long imageAuthor)
Initializes the value for theimageAuthor
attribute.- Parameters:
imageAuthor
- The value for imageAuthor (can benull
)- Returns:
this
builder for use in a chained invocation
-
lastUpdated
public final ActorDTO.Builder lastUpdated(@Nullable String lastUpdated)
Initializes the value for thelastUpdated
attribute.- Parameters:
lastUpdated
- The value for lastUpdated (can benull
)- Returns:
this
builder for use in a chained invocation
-
name
public final ActorDTO.Builder name(@Nullable String name)
Initializes the value for thename
attribute.- Parameters:
name
- The value for name (can benull
)- Returns:
this
builder for use in a chained invocation
-
role
public final ActorDTO.Builder role(@Nullable String role)
Initializes the value for therole
attribute.- Parameters:
role
- The value for role (can benull
)- Returns:
this
builder for use in a chained invocation
-
seriesId
public final ActorDTO.Builder seriesId(@Nullable Long seriesId)
Initializes the value for theseriesId
attribute.- Parameters:
seriesId
- The value for seriesId (can benull
)- Returns:
this
builder for use in a chained invocation
-
sortOrder
public final ActorDTO.Builder sortOrder(@Nullable Long sortOrder)
Initializes the value for thesortOrder
attribute.- Parameters:
sortOrder
- The value for sortOrder (can benull
)- Returns:
this
builder 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
-
-