Package io.resys.hdes.client.api.ast
Class ImmutableAstCommandMessage.Builder
java.lang.Object
io.resys.hdes.client.api.ast.ImmutableAstCommandMessage.Builder
- Enclosing class:
- ImmutableAstCommandMessage
Builds instances of type
ImmutableAstCommandMessage.
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 TypeMethodDescriptionbuild()Builds a newImmutableAstCommandMessage.from(AstBody.AstCommandMessage instance) Fill a builder with attribute values from the providedAstCommandMessageinstance.line(int line) Initializes the value for thelineattribute.range(AstBody.AstCommandRange range) Initializes the value for therangeattribute.Initializes the value for thetypeattribute.Initializes the value for thevalueattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableAstCommandMessage.Builder from(AstBody.AstCommandMessage instance) Fill a builder with attribute values from the providedAstCommandMessageinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
line
Initializes the value for thelineattribute.- Parameters:
line- The value for line- Returns:
thisbuilder for use in a chained invocation
-
value
Initializes the value for thevalueattribute.- Parameters:
value- The value for value- Returns:
thisbuilder for use in a chained invocation
-
type
@CanIgnoreReturnValue public final ImmutableAstCommandMessage.Builder type(AstBody.CommandMessageType type) Initializes the value for thetypeattribute.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
range
@CanIgnoreReturnValue public final ImmutableAstCommandMessage.Builder range(@Nullable AstBody.AstCommandRange range) Initializes the value for therangeattribute.- Parameters:
range- The value for range (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableAstCommandMessage.- Returns:
- An immutable instance of AstCommandMessage
- Throws:
IllegalStateException- if any required attributes are missing
-