Class: ReplaceCommand

ReplaceCommand(volume, source, destination, duration)

Represent a command to replace one substance with another.

Constructor

new ReplaceCommand(volume, source, destination, duration)

Create a new ReplaceCommand.
Parameters:
Name Type Description
volume EngineNumber Volume to replace.
source string Source substance.
destination string Destination substance.
duration YearMatcher Duration of replacement.
Source:

Methods

getDestination() → {string}

Get the destination substance to replace with.
Source:
Returns:
Name of destination substance.
Type
string

getDuration() → {YearMatcher}

Get the duration for which this replacement applies.
Source:
Returns:
The duration specification, or null for all years.
Type
YearMatcher

getIsCompatible() → {boolean}

Check if this replace command is compatible with UI editing.
Source:
Returns:
Always returns true as replace commands are UI-compatible.
Type
boolean

getSource() → {string}

Get the source substance to replace from.
Source:
Returns:
Name of source substance.
Type
string

getTypeName() → {string}

Get the type name of this replace command.
Source:
Returns:
Always returns "replace".
Type
string

getVolume() → {EngineNumber}

Get the volume to be replaced.
Source:
Returns:
The volume with units.
Type
EngineNumber