Class UserDTO.Builder

  • Enclosing class:
    UserDTO

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


    This builder provides a fluent API for setting certain object properties and creating a new immutable UserDTO 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 UserDTO.Builder from​(User instance)
        Fill a builder with attribute values from the provided com.github.m0nk3y2k4.thetvdb.api.model.data.User instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final UserDTO.Builder from​(UserDTO instance)
        Fill a builder with attribute values from the provided com.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.UserDTO instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • favoritesDisplaymode

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

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

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