Class RetireOperation
java.lang.Object
org.kigalisim.lang.operation.RetireOperation
- All Implemented Interfaces:
Operation
-
Constructor Summary
ConstructorsConstructorDescriptionRetireOperation(Operation amountOperation) Create a new RetireOperation that applies to all years.RetireOperation(Operation amountOperation, ParsedDuring during) Create a new RetireOperation that applies to a specific time period. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(PushDownMachine machine) Execute the retire operation on the given push-down machine.Get a record describing this operation's semantics.
-
Constructor Details
-
RetireOperation
Create a new RetireOperation that applies to all years.- Parameters:
amountOperation- The operation that calculates the retirement rate.
-
RetireOperation
Create a new RetireOperation that applies to a specific time period.- Parameters:
amountOperation- The operation that calculates the retirement rate.during- The time period during which this operation applies.
-
-
Method Details
-
execute
Execute the retire operation on the given push-down machine.Evaluates the amount operation to get the retirement rate, builds a year matcher from the optional during clause, and checks if this operation should execute in the current year. If the year is in range, validates that retire commands are not mixed with and without replacement in the same step, then applies the retirement to the engine. -
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.
-