Class SeriesSearchResultDTO.Builder

  • Enclosing class:
    SeriesSearchResultDTO

    public static class SeriesSearchResultDTO.Builder
    extends Object
    Builder used to create a new immutable SeriesSearchResultDTO implementation


    This builder provides a fluent API for setting certain object properties and creating a new immutable SeriesSearchResultDTO 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 Detail

      • Builder

        public Builder()
    • Method Detail

      • from

        public final SeriesSearchResultDTO.Builder from​(SeriesSearchResult instance)
        Fill a builder with attribute values from the provided com.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 SeriesSearchResultDTO.Builder from​(SeriesSearchResultDTO instance)
        Fill a builder with attribute values from the provided com.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.SeriesSearchResultDTO instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • addAliases

        public final SeriesSearchResultDTO.Builder addAliases​(String element)
        Adds one element to aliases list.
        Parameters:
        element - A aliases element
        Returns:
        this builder for use in a chained invocation
      • addAliases

        public final SeriesSearchResultDTO.Builder addAliases​(String... elements)
        Adds elements to aliases list.
        Parameters:
        elements - An array of aliases elements
        Returns:
        this builder for use in a chained invocation
      • aliases

        public final SeriesSearchResultDTO.Builder aliases​(Iterable<String> elements)
        Sets or replaces all elements for aliases list.
        Parameters:
        elements - An iterable of aliases elements
        Returns:
        this builder for use in a chained invocation
      • firstAired

        public final SeriesSearchResultDTO.Builder firstAired​(@Nullable
                                                              String firstAired)
        Initializes the value for the firstAired attribute.
        Parameters:
        firstAired - The value for firstAired (can be null)
        Returns:
        this builder for use in a chained invocation
      • id

        public final SeriesSearchResultDTO.Builder id​(@Nullable
                                                      Long id)
        Initializes the value for the id attribute.
        Parameters:
        id - The value for id (can be null)
        Returns:
        this builder for use in a chained invocation
      • seriesName

        public final SeriesSearchResultDTO.Builder seriesName​(@Nullable
                                                              String seriesName)
        Initializes the value for the seriesName attribute.
        Parameters:
        seriesName - The value for seriesName (can be null)
        Returns:
        this builder for use in a chained invocation