Class ImmutableFormAndTags.Builder

  • Enclosing class:
    ImmutableFormAndTags

    @NotThreadSafe
    public static final class ImmutableFormAndTags.Builder
    extends Object
    Builds instances of type ImmutableFormAndTags. 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 ImmutableFormAndTags.Builder from​(DialobComposer.FormAndTags instance)
        Fill a builder with attribute values from the provided FormAndTags 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
      • form

        @CanIgnoreReturnValue
        public final ImmutableFormAndTags.Builder form​(io.dialob.api.form.Form form)
        Initializes the value for the form attribute.
        Parameters:
        form - The value for form
        Returns:
        this builder for use in a chained invocation
      • addTags

        @CanIgnoreReturnValue
        public final ImmutableFormAndTags.Builder addTags​(io.dialob.api.form.FormTag element)
        Adds one element to tags list.
        Parameters:
        element - A tags element
        Returns:
        this builder for use in a chained invocation
      • addTags

        @CanIgnoreReturnValue
        public final ImmutableFormAndTags.Builder addTags​(io.dialob.api.form.FormTag... elements)
        Adds elements to tags list.
        Parameters:
        elements - An array of tags elements
        Returns:
        this builder for use in a chained invocation
      • tags

        @CanIgnoreReturnValue
        public final ImmutableFormAndTags.Builder tags​(Iterable<? extends io.dialob.api.form.FormTag> elements)
        Sets or replaces all elements for tags list.
        Parameters:
        elements - An iterable of tags elements
        Returns:
        this builder for use in a chained invocation
      • addAllTags

        @CanIgnoreReturnValue
        public final ImmutableFormAndTags.Builder addAllTags​(Iterable<? extends io.dialob.api.form.FormTag> elements)
        Adds elements to tags list.
        Parameters:
        elements - An iterable of tags elements
        Returns:
        this builder for use in a chained invocation