Class ImmutableSequencePayloadForm.Builder
java.lang.Object
io.jenkins.plugins.trunk.model.event.ImmutableSequencePayloadForm.Builder
- Enclosing class:
ImmutableSequencePayloadForm
Builds instances of type
ImmutableSequencePayloadForm
.
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 TypeMethodDescriptionaddAllTags
(Iterable<? extends ActivityTagForm> elements) Adds elements totags
list.addTags
(ActivityTagForm element) Adds one element totags
list.addTags
(ActivityTagForm... elements) Adds elements totags
list.build()
Builds a newImmutableSequencePayloadForm
.from
(SequencePayloadForm instance) Fill a builder with attribute values from the providedSequencePayloadForm
instance.tags
(Iterable<? extends ActivityTagForm> elements) Sets or replaces all elements fortags
list.
-
Method Details
-
from
Fill a builder with attribute values from the providedSequencePayloadForm
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
-
addTags
Adds one element totags
list.- Parameters:
element
- A tags element- Returns:
this
builder for use in a chained invocation
-
addTags
Adds elements totags
list.- Parameters:
elements
- An array of tags elements- Returns:
this
builder for use in a chained invocation
-
tags
public final ImmutableSequencePayloadForm.Builder tags(@Nullable Iterable<? extends ActivityTagForm> elements) Sets or replaces all elements fortags
list.- Parameters:
elements
- An iterable of tags elements- Returns:
this
builder for use in a chained invocation
-
addAllTags
public final ImmutableSequencePayloadForm.Builder addAllTags(Iterable<? extends ActivityTagForm> elements) Adds elements totags
list.- Parameters:
elements
- An iterable of tags elements- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableSequencePayloadForm
.- Returns:
- An immutable instance of SequencePayloadForm
- Throws:
IllegalStateException
- if any required attributes are missing
-