Class APIResponseDTO.LinksDTO.Builder
- java.lang.Object
-
- com.github.m0nk3y2k4.thetvdb.internal.api.impl.model.APIResponseDTO.LinksDTO.Builder
-
- Enclosing class:
- APIResponseDTO.LinksDTO
public static class APIResponseDTO.LinksDTO.Builder extends Object
Builder used to create a new immutableAPIResponseDTO.LinksDTO
implementation
This builder provides a fluent API for setting certain object properties and creating a new immutableAPIResponseDTO.LinksDTO
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 APIResponseDTO.LinksDTO
build()
Builds a newLinksDTO
.APIResponseDTO.LinksDTO.Builder
first(Integer first)
Initializes the value for thefirst
attribute.APIResponseDTO.LinksDTO.Builder
from(APIResponse.Links instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.APIResponse.Links
instance.APIResponseDTO.LinksDTO.Builder
from(APIResponseDTO.LinksDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.APIResponseDTO.LinksDTO
instance.APIResponseDTO.LinksDTO.Builder
last(Integer last)
Initializes the value for thelast
attribute.APIResponseDTO.LinksDTO.Builder
next(Integer next)
Initializes the value for thenext
attribute.APIResponseDTO.LinksDTO.Builder
previous(Integer previous)
Initializes the value for theprevious
attribute.
-
-
-
Method Detail
-
from
public final APIResponseDTO.LinksDTO.Builder from(APIResponse.Links instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.APIResponse.Links
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
public final APIResponseDTO.LinksDTO.Builder from(APIResponseDTO.LinksDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.APIResponseDTO.LinksDTO
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
first
public final APIResponseDTO.LinksDTO.Builder first(@Nullable Integer first)
Initializes the value for thefirst
attribute.- Parameters:
first
- The value for first (can benull
)- Returns:
this
builder for use in a chained invocation
-
last
public final APIResponseDTO.LinksDTO.Builder last(@Nullable Integer last)
Initializes the value for thelast
attribute.- Parameters:
last
- The value for last (can benull
)- Returns:
this
builder for use in a chained invocation
-
next
public final APIResponseDTO.LinksDTO.Builder next(@Nullable Integer next)
Initializes the value for thenext
attribute.- Parameters:
next
- The value for next (can benull
)- Returns:
this
builder for use in a chained invocation
-
previous
public final APIResponseDTO.LinksDTO.Builder previous(@Nullable Integer previous)
Initializes the value for theprevious
attribute.- Parameters:
previous
- The value for previous (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
public APIResponseDTO.LinksDTO build()
Builds a newLinksDTO
.- Returns:
- An immutable instance of LinksDTO
- Throws:
IllegalStateException
- if any required attributes are missing
-
-