Package eu.bandm.sig.adlib2
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 Summary
ConstructorsConstructorDescriptionCreates a new instance with no specified initial input.LongSignalPort(@Opt LongSignalSource input) Creates a new instance with the specified initial input. -
Method Summary
Modifier and TypeMethodDescriptionfinal longReturns the current value of this signal source.getInput()Returns the current input signal source.final voidsetInput(LongSignalSource input) Sets the current input signal source.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.bandm.sig.adlib2.LongSignalSource
abs, add, asDouble, asFloat, asInt, clockedAfter, delayed, delayed, divide, equal, getConstantAsLong, getValueClass, greaterOrEqual, greaterThan, guard, hasConstantAsLong, invariant, lessOrEqual, lessThan, map, max, min, modulo, multiply, negate, negative, nonEqual, nonnegative, nonpositive, nonzero, positive, power, probe, relateWith, sampleAndHold, stored, subtract, zero, zipWith
-
Constructor Details
-
LongSignalPort
public LongSignalPort()Creates a new instance with no specified initial input. -
LongSignalPort
Creates a new instance with the specified initial input.- Parameters:
input- the input signal source
-
-
Method Details
-
getInput
Returns the current input signal source.- Returns:
- the current input signal source, or
nullif not available
-
setInput
Sets the current input signal source.- Parameters:
input- the new input signal source, ornull
-
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:
getAsLongin interfaceLongSignalSource- Specified by:
getAsLongin interfaceLongSupplier- Returns:
- the current value of this signal source
- Throws:
NullPointerException- if the current input signal source is null
-