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.LinksDTOimplementation
This builder provides a fluent API for setting certain object properties and creating a new immutableAPIResponseDTO.LinksDTOinstance 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.LinksDTObuild()Builds a newLinksDTO.APIResponseDTO.LinksDTO.Builderfirst(Integer first)Initializes the value for thefirstattribute.APIResponseDTO.LinksDTO.Builderfrom(APIResponse.Links instance)Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.APIResponse.Linksinstance.APIResponseDTO.LinksDTO.Builderfrom(APIResponseDTO.LinksDTO instance)Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.APIResponseDTO.LinksDTOinstance.APIResponseDTO.LinksDTO.Builderlast(Integer last)Initializes the value for thelastattribute.APIResponseDTO.LinksDTO.Buildernext(Integer next)Initializes the value for thenextattribute.APIResponseDTO.LinksDTO.Builderprevious(Integer previous)Initializes the value for thepreviousattribute.
-
-
-
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.Linksinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder 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.LinksDTOinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
first
public final APIResponseDTO.LinksDTO.Builder first(@Nullable Integer first)
Initializes the value for thefirstattribute.- Parameters:
first- The value for first (can benull)- Returns:
thisbuilder for use in a chained invocation
-
last
public final APIResponseDTO.LinksDTO.Builder last(@Nullable Integer last)
Initializes the value for thelastattribute.- Parameters:
last- The value for last (can benull)- Returns:
thisbuilder for use in a chained invocation
-
next
public final APIResponseDTO.LinksDTO.Builder next(@Nullable Integer next)
Initializes the value for thenextattribute.- Parameters:
next- The value for next (can benull)- Returns:
thisbuilder for use in a chained invocation
-
previous
public final APIResponseDTO.LinksDTO.Builder previous(@Nullable Integer previous)
Initializes the value for thepreviousattribute.- Parameters:
previous- The value for previous (can benull)- Returns:
thisbuilder 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
-
-