Constructor
new RetireCommand(value, duration, withReplacement)
Create a new RetireCommand.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
EngineNumber | Retirement rate/amount. |
duration |
YearMatcher | null | Duration specification or null for all years. |
withReplacement |
boolean | Whether to maintain equipment via replacement. |
- Source:
Methods
getDuration() → {YearMatcher|null}
Get the duration for which this command applies.
- Source:
Returns:
The duration specification, or null for all years.
- Type
- YearMatcher | null
getIsCompatible() → {boolean}
Check if this command is compatible with UI editing.
- Source:
Returns:
Always returns true as retire commands are UI-compatible.
- Type
- boolean
getTypeName() → {string}
Get the type name of this command.
- Source:
Returns:
Always returns "retire".
- Type
- string
getValue() → {EngineNumber}
Get the value associated with this command.
- Source:
Returns:
The retirement rate/amount with units.
- Type
- EngineNumber
getWithReplacement() → {boolean}
Get whether this retire command uses replacement.
- Source:
Returns:
True if retire should maintain equipment via replacement.
- Type
- boolean