Class RechargeOperation
java.lang.Object
org.kigalisim.lang.operation.RechargeOperation
- All Implemented Interfaces:
Operation
Operation that services equipment with a specified volume and intensity.
This operation calculates a servicing volume and intensity and applies it to the engine. It can optionally be limited to a specific time period using a ParsedDuring object. The target parameter determines whether this operates on prior equipment (recharge) or new equipment (precharge).
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRechargeOperation(Operation volumeOperation, Operation intensityOperation, Optional<ParsedDuring> duringMaybe, String target) Create a new RechargeOperation with explicit target and optional time period. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(PushDownMachine machine) Execute the calculation and leave the result at the top of the stack.Get a record describing this operation's semantics.
-
Field Details
-
PRIOR
Target stream name for servicing existing (prior) equipment, producing a recharge.- See Also:
-
NEW
Target stream name for servicing new equipment before sale, producing a precharge.- See Also:
-
-
Constructor Details
-
RechargeOperation
public RechargeOperation(Operation volumeOperation, Operation intensityOperation, Optional<ParsedDuring> duringMaybe, String target) Create a new RechargeOperation with explicit target and optional time period.- Parameters:
volumeOperation- The operation that calculates the servicing volume.intensityOperation- The operation that calculates the servicing intensity.duringMaybe- The optional time period during which this operation applies, or empty for all years.target- The target stream (PRIORfor recharge,NEWfor precharge).
-
-
Method Details
-
execute
Execute the calculation and leave the result at the top of the stack. -
getStaticSemantics
Get a record describing this operation's semantics.Get a record describing this operation's semantics that are inferrable from its static expression in code. In other words, properties and effects which do not require inspection at time of executing the operation.
- Specified by:
getStaticSemanticsin interfaceOperation- Returns:
- Inference of common static properties found for this operation.
-