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