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 totagslist.addTags(ActivityTagForm element) Adds one element totagslist.addTags(ActivityTagForm... elements) Adds elements totagslist.build()Builds a newImmutableSequencePayloadForm.from(SequencePayloadForm instance) Fill a builder with attribute values from the providedSequencePayloadForminstance.tags(Iterable<? extends ActivityTagForm> elements) Sets or replaces all elements fortagslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedSequencePayloadForminstance. 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:
thisbuilder for use in a chained invocation
-
addTags
Adds one element totagslist.- Parameters:
element- A tags element- Returns:
thisbuilder for use in a chained invocation
-
addTags
Adds elements totagslist.- Parameters:
elements- An array of tags elements- Returns:
thisbuilder for use in a chained invocation
-
tags
public final ImmutableSequencePayloadForm.Builder tags(@Nullable Iterable<? extends ActivityTagForm> elements) Sets or replaces all elements fortagslist.- Parameters:
elements- An iterable of tags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllTags
public final ImmutableSequencePayloadForm.Builder addAllTags(Iterable<? extends ActivityTagForm> elements) Adds elements totagslist.- Parameters:
elements- An iterable of tags elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableSequencePayloadForm.- Returns:
- An immutable instance of SequencePayloadForm
- Throws:
IllegalStateException- if any required attributes are missing
-