Class ImmutableExpressionResult.Builder
java.lang.Object
io.resys.hdes.client.api.programs.ImmutableExpressionResult.Builder
- Enclosing class:
- ImmutableExpressionResult
Builds instances of type
ImmutableExpressionResult.
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 TypeMethodDescriptionaddAllConstants(Iterable<String> elements) Adds elements toconstantslist.addConstants(String element) Adds one element toconstantslist.addConstants(String... elements) Adds elements toconstantslist.build()Builds a newImmutableExpressionResult.Sets or replaces all elements forconstantslist.from(ExpressionProgram.ExpressionResult instance) Fill a builder with attribute values from the providedExpressionResultinstance.type(TypeDef.ValueType type) Initializes the value for thetypeattribute.Initializes the value for thevalueattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableExpressionResult.Builder from(ExpressionProgram.ExpressionResult instance) Fill a builder with attribute values from the providedExpressionResultinstance. 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
-
type
Initializes the value for thetypeattribute.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
addConstants
Adds one element toconstantslist.- Parameters:
element- A constants element- Returns:
thisbuilder for use in a chained invocation
-
addConstants
@CanIgnoreReturnValue public final ImmutableExpressionResult.Builder addConstants(String... elements) Adds elements toconstantslist.- Parameters:
elements- An array of constants elements- Returns:
thisbuilder for use in a chained invocation
-
constants
@CanIgnoreReturnValue public final ImmutableExpressionResult.Builder constants(Iterable<String> elements) Sets or replaces all elements forconstantslist.- Parameters:
elements- An iterable of constants elements- Returns:
thisbuilder for use in a chained invocation
-
addAllConstants
@CanIgnoreReturnValue public final ImmutableExpressionResult.Builder addAllConstants(Iterable<String> elements) Adds elements toconstantslist.- Parameters:
elements- An iterable of constants elements- Returns:
thisbuilder for use in a chained invocation
-
value
Initializes the value for thevalueattribute.- Parameters:
value- The value for value (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableExpressionResult.- Returns:
- An immutable instance of ExpressionResult
- Throws:
IllegalStateException- if any required attributes are missing
-