Class NumberSignal


public class NumberSignal extends ValueSignal<Double>
A signal that holds a number value.
  • Constructor Details

    • NumberSignal

      public NumberSignal(Double defaultValue)
      Creates a new NumberSignal with the provided default value.
      Parameters:
      defaultValue - the default value
      Throws:
      NullPointerException - if the default value is null
    • NumberSignal

      public NumberSignal()
      Creates a new NumberSignal with the default value of 0.
  • Method Details

    • processEvent

      protected boolean processEvent(com.fasterxml.jackson.databind.node.ObjectNode event)
      Processes the event and updates the signal value if needed. Note that this method is not thread-safe and should be called from a synchronized context.
      Overrides:
      processEvent in class ValueSignal<Double>
      Parameters:
      event - the event to process
      Returns:
      true if the event was successfully processed and the signal value was updated, false otherwise.