Class LongSignalPort

java.lang.Object
eu.bandm.sig.adlib2.AbstractSignalPort
eu.bandm.sig.adlib2.LongSignalPort
All Implemented Interfaces:
AbstractSignalSource, LongSignalSource, LongSupplier

@Generated(generator="eu.bandm.tools.expander", version="1.3.1", timestamp="2026-10-23T14:02:07") public class LongSignalPort extends AbstractSignalPort implements LongSignalSource
A receptacle for a signal source of primitive type long that can be plugged at runtime.

An instance of this class, when used directly, acts as a dynamic proxy that delegates all method invocations to a pluggable input signal source. The currently plugged input is looked up via getInput() at every delegation event, such that re-plugging via setInput(LongSignalSource) has immediate effect.

The pluggable input signal source can be set to null, which will cause the getAsLong() method of this object to fail at runtime with NullPointerException.

  • Constructor Details

    • LongSignalPort

      public LongSignalPort()
      Creates a new instance with no specified initial input.
    • LongSignalPort

      public LongSignalPort(@Opt LongSignalSource input)
      Creates a new instance with the specified initial input.
      Parameters:
      input - the input signal source
  • Method Details

    • getInput

      public @Opt LongSignalSource getInput()
      Returns the current input signal source.
      Returns:
      the current input signal source, or null if not available
    • setInput

      public final void setInput(LongSignalSource input)
      Sets the current input signal source.
      Parameters:
      input - the new input signal source, or null
    • getAsLong

      public final long getAsLong()
      Returns the current value of this signal source.

      The value may be either computed on demand, or retrieved from storage.

      Implementations of this method should have no side effect.

      This implementation always delegates to getInput().getAsLong().

      Specified by:
      getAsLong in interface LongSignalSource
      Specified by:
      getAsLong in interface LongSupplier
      Returns:
      the current value of this signal source
      Throws:
      NullPointerException - if the current input signal source is null