Class OperationStaticSemanticsBuilder
java.lang.Object
org.kigalisim.lang.operation.OperationStaticSemanticsBuilder
Builder for an OperationStaticSemantics record.
Builder which allows operations to specify only the statically inferrable properties which apply to them, leaving the rest empty.
-
Constructor Summary
ConstructorsConstructorDescriptionOperationStaticSemanticsBuilder(OperationType operationType) Create a new builder with all optional properties empty. -
Method Summary
Modifier and TypeMethodDescriptionaddIfStream(String name) Indicate that a name is included in the operation if it is a known stream.Indicate that a stream is included in the operation.build()Build the record from the properties specified so far.setAssumePriorNew(boolean newFlag) Indicate whether the operation treats prior equipment as new.
-
Constructor Details
-
OperationStaticSemanticsBuilder
Create a new builder with all optional properties empty.- Parameters:
operationType- The type of operation for which the record is being built.
-
-
Method Details
-
addStream
Indicate that a stream is included in the operation.- Parameters:
stream- The name of the stream involved in the operation.- Returns:
- This builder for chaining.
-
addIfStream
Indicate that a name is included in the operation if it is a known stream.Intended for names which may refer to either a stream or a substance, like a displacement target. Names which are not known streams are ignored.
- Parameters:
name- The name which may be a stream involved in the operation.- Returns:
- This builder for chaining.
-
setAssumePriorNew
Indicate whether the operation treats prior equipment as new.- Parameters:
newFlag- True if theassuming newmodifier is present and false otherwise.- Returns:
- This builder for chaining.
-
build
Build the record from the properties specified so far.- Returns:
- Newly constructed static semantics record.
-