Class ImmutableIconTheme.Builder

java.lang.Object
com.riadalabs.jira.plugins.insight.services.model.icontheme.ImmutableIconTheme.Builder
Enclosing class:
ImmutableIconTheme

@NotThreadSafe public static final class ImmutableIconTheme.Builder extends Object
Builds instances of type ImmutableIconTheme. 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 Details

    • from

      @CanIgnoreReturnValue public final ImmutableIconTheme.Builder from(IconTheme instance)
      Fill a builder with attribute values from the provided IconTheme instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setColor1

      @CanIgnoreReturnValue public final ImmutableIconTheme.Builder setColor1(String color1)
      Initializes the value for the color1 attribute.
      Parameters:
      color1 - The value for color1
      Returns:
      this builder for use in a chained invocation
    • setColor2

      @CanIgnoreReturnValue public final ImmutableIconTheme.Builder setColor2(String color2)
      Initializes the value for the color2 attribute.
      Parameters:
      color2 - The value for color2
      Returns:
      this builder for use in a chained invocation
    • setColor3

      @CanIgnoreReturnValue public final ImmutableIconTheme.Builder setColor3(String color3)
      Initializes the value for the color3 attribute.
      Parameters:
      color3 - The value for color3
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableIconTheme build()
      Builds a new ImmutableIconTheme.
      Returns:
      An immutable instance of IconTheme
      Throws:
      IllegalStateException - if any required attributes are missing