Class ImmutableIconTheme.Builder
java.lang.Object
com.riadalabs.jira.plugins.insight.services.model.icontheme.ImmutableIconTheme.Builder
- Enclosing class:
- ImmutableIconTheme
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 Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newImmutableIconTheme
.Fill a builder with attribute values from the providedIconTheme
instance.Initializes the value for thecolor1
attribute.Initializes the value for thecolor2
attribute.Initializes the value for thecolor3
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedIconTheme
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
Initializes the value for thecolor1
attribute.- Parameters:
color1
- The value for color1- Returns:
this
builder for use in a chained invocation
-
setColor2
Initializes the value for thecolor2
attribute.- Parameters:
color2
- The value for color2- Returns:
this
builder for use in a chained invocation
-
setColor3
Initializes the value for thecolor3
attribute.- Parameters:
color3
- The value for color3- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableIconTheme
.- Returns:
- An immutable instance of IconTheme
- Throws:
IllegalStateException
- if any required attributes are missing
-