Package io.dialob.api.proto
Class ImmutableActions.Builder
java.lang.Object
io.dialob.api.proto.ImmutableActions.Builder
- Enclosing class:
- ImmutableActions
Builds instances of type
ImmutableActions.
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 TypeMethodDescriptionfinal ImmutableActions.BuilderSets or replaces all elements foractionslist.final ImmutableActions.BuilderaddActions(Action element) Adds one element toactionslist.final ImmutableActions.BuilderaddActions(Action... elements) Adds elements toactionslist.final ImmutableActions.BuilderaddAllActions(Iterable<? extends Action> elements) Adds elements toactionslist.build()Builds a newImmutableActions.final ImmutableActions.BuilderFill a builder with attribute values from the providedActionsinstance.final ImmutableActions.BuilderInitializes the value for therevattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedActionsinstance. 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
-
rev
Initializes the value for therevattribute.- Parameters:
rev- The value for rev (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addActions
Adds one element toactionslist.- Parameters:
element- A actions element- Returns:
thisbuilder for use in a chained invocation
-
addActions
Adds elements toactionslist.- Parameters:
elements- An array of actions elements- Returns:
thisbuilder for use in a chained invocation
-
actions
Sets or replaces all elements foractionslist.- Parameters:
elements- An iterable of actions elements- Returns:
thisbuilder for use in a chained invocation
-
addAllActions
Adds elements toactionslist.- Parameters:
elements- An iterable of actions elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableActions.- Returns:
- An immutable instance of Actions
- Throws:
IllegalStateException- if any required attributes are missing
-