Class ImmutableDecisionRow.Builder
java.lang.Object
io.resys.hdes.client.api.programs.ImmutableDecisionRow.Builder
- Enclosing class:
- ImmutableDecisionRow
Builds instances of type
ImmutableDecisionRow.
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 TypeMethodDescriptionaccepts(Iterable<? extends DecisionProgram.DecisionRowAccepts> elements) Sets or replaces all elements foracceptslist.Adds one element toacceptslist.addAccepts(DecisionProgram.DecisionRowAccepts... elements) Adds elements toacceptslist.addAllAccepts(Iterable<? extends DecisionProgram.DecisionRowAccepts> elements) Adds elements toacceptslist.addAllReturns(Iterable<? extends DecisionProgram.DecisionRowReturns> elements) Adds elements toreturnslist.Adds one element toreturnslist.addReturns(DecisionProgram.DecisionRowReturns... elements) Adds elements toreturnslist.build()Builds a newImmutableDecisionRow.from(DecisionProgram.DecisionRow instance) Fill a builder with attribute values from the providedDecisionRowinstance.order(int order) Initializes the value for theorderattribute.returns(Iterable<? extends DecisionProgram.DecisionRowReturns> elements) Sets or replaces all elements forreturnslist.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableDecisionRow.Builder from(DecisionProgram.DecisionRow instance) Fill a builder with attribute values from the providedDecisionRowinstance. 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
-
order
Initializes the value for theorderattribute.- Parameters:
order- The value for order- Returns:
thisbuilder for use in a chained invocation
-
addAccepts
@CanIgnoreReturnValue public final ImmutableDecisionRow.Builder addAccepts(DecisionProgram.DecisionRowAccepts element) Adds one element toacceptslist.- Parameters:
element- A accepts element- Returns:
thisbuilder for use in a chained invocation
-
addAccepts
@CanIgnoreReturnValue public final ImmutableDecisionRow.Builder addAccepts(DecisionProgram.DecisionRowAccepts... elements) Adds elements toacceptslist.- Parameters:
elements- An array of accepts elements- Returns:
thisbuilder for use in a chained invocation
-
accepts
@CanIgnoreReturnValue public final ImmutableDecisionRow.Builder accepts(Iterable<? extends DecisionProgram.DecisionRowAccepts> elements) Sets or replaces all elements foracceptslist.- Parameters:
elements- An iterable of accepts elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAccepts
@CanIgnoreReturnValue public final ImmutableDecisionRow.Builder addAllAccepts(Iterable<? extends DecisionProgram.DecisionRowAccepts> elements) Adds elements toacceptslist.- Parameters:
elements- An iterable of accepts elements- Returns:
thisbuilder for use in a chained invocation
-
addReturns
@CanIgnoreReturnValue public final ImmutableDecisionRow.Builder addReturns(DecisionProgram.DecisionRowReturns element) Adds one element toreturnslist.- Parameters:
element- A returns element- Returns:
thisbuilder for use in a chained invocation
-
addReturns
@CanIgnoreReturnValue public final ImmutableDecisionRow.Builder addReturns(DecisionProgram.DecisionRowReturns... elements) Adds elements toreturnslist.- Parameters:
elements- An array of returns elements- Returns:
thisbuilder for use in a chained invocation
-
returns
@CanIgnoreReturnValue public final ImmutableDecisionRow.Builder returns(Iterable<? extends DecisionProgram.DecisionRowReturns> elements) Sets or replaces all elements forreturnslist.- Parameters:
elements- An iterable of returns elements- Returns:
thisbuilder for use in a chained invocation
-
addAllReturns
@CanIgnoreReturnValue public final ImmutableDecisionRow.Builder addAllReturns(Iterable<? extends DecisionProgram.DecisionRowReturns> elements) Adds elements toreturnslist.- Parameters:
elements- An iterable of returns elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableDecisionRow.- Returns:
- An immutable instance of DecisionRow
- Throws:
IllegalStateException- if any required attributes are missing
-