Class ImmutableStrategyDto.Builder

  • Enclosing class:
    ImmutableStrategyDto

    @NotThreadSafe
    public static final class ImmutableStrategyDto.Builder
    extends Object
    Builds instances of type ImmutableStrategyDto. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableStrategyDto.Builder from​(StrategyDto instance)
        Fill a builder with attribute values from the provided StrategyDto instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • type

        @CanIgnoreReturnValue
        public final ImmutableStrategyDto.Builder type​(String type)
        Initializes the value for the type attribute.

        If not set, this attribute will have a default value as returned by the initializer of type.

        Parameters:
        type - The value for type
        Returns:
        this builder for use in a chained invocation
      • putParameters

        @CanIgnoreReturnValue
        public final ImmutableStrategyDto.Builder putParameters​(String key,
                                                                Object value)
        Put one entry to the parameters map.
        Parameters:
        key - The key in the parameters map
        value - The associated value in the parameters map
        Returns:
        this builder for use in a chained invocation
      • putParameters

        @CanIgnoreReturnValue
        public final ImmutableStrategyDto.Builder putParameters​(Map.Entry<String,​? extends Object> entry)
        Put one entry to the parameters map. Nulls are not permitted
        Parameters:
        entry - The key and value entry
        Returns:
        this builder for use in a chained invocation
      • parameters

        @CanIgnoreReturnValue
        public final ImmutableStrategyDto.Builder parameters​(Map<String,​? extends Object> entries)
        Sets or replaces all mappings from the specified map as entries for the parameters map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the parameters map
        Returns:
        this builder for use in a chained invocation
      • putAllParameters

        @CanIgnoreReturnValue
        public final ImmutableStrategyDto.Builder putAllParameters​(Map<String,​? extends Object> entries)
        Put all mappings from the specified map as entries to parameters map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the parameters map
        Returns:
        this builder for use in a chained invocation