Class GetStreamOperation

java.lang.Object
org.kigalisim.lang.operation.GetStreamOperation
All Implemented Interfaces:
Operation

public class GetStreamOperation extends Object implements Operation
Operation to get a stream value.
  • Constructor Details

    • GetStreamOperation

      public GetStreamOperation(String streamName)
      Create a new GetStreamOperation.
      Parameters:
      streamName - The name of the stream to get.
    • GetStreamOperation

      public GetStreamOperation(String streamName, String units)
      Create a new GetStreamOperation with unit conversion.
      Parameters:
      streamName - The name of the stream to get.
      units - The units to convert to.
    • GetStreamOperation

      public GetStreamOperation(String streamName, String targetSubstance, String units)
      Create a new GetStreamOperation with scope resolution and unit conversion.
      Parameters:
      streamName - The name of the stream to get.
      targetSubstance - The substance name to resolve to (for indirect access).
      units - The units to convert to.
  • Method Details

    • execute

      public void execute(PushDownMachine machine)
      Execute the calculation and leave the result at the top of the stack.
      Specified by:
      execute in interface Operation
      Parameters:
      machine - The machine in which to execute the calculation if needed.