Package microsim.statistics.functions
Class MaxArrayFunction.Long
java.lang.Object
microsim.statistics.functions.AbstractFunction
microsim.statistics.functions.AbstractArrayFunction
microsim.statistics.functions.MaxArrayFunction
microsim.statistics.functions.MaxArrayFunction.Long
- All Implemented Interfaces:
EventListener
,DoubleSource
,LongSource
,UpdatableSource
- Enclosing class:
MaxArrayFunction
MaxFunction operating on long source values.
-
Nested Class Summary
Nested classes/interfaces inherited from class microsim.statistics.functions.MaxArrayFunction
MaxArrayFunction.Double, MaxArrayFunction.Integer, MaxArrayFunction.Long
Nested classes/interfaces inherited from interface microsim.statistics.DoubleSource
DoubleSource.Variables
Nested classes/interfaces inherited from interface microsim.statistics.LongSource
LongSource.Variables
-
Field Summary
Fields inherited from class microsim.statistics.functions.AbstractArrayFunction
dblSource, intSource, lngSource, type, TYPE_DBL, TYPE_INT, TYPE_LNG
Fields inherited from class microsim.statistics.functions.AbstractFunction
timeChecker
-
Constructor Summary
ConstructorDescriptionLong
(@NonNull LongArraySource source) Creates a maximum function on a long array source. -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(long @NonNull [] data) Applies themax
function to the provided array.double
getDoubleValue
(@NonNull Enum<?> variableID) Returns the double value corresponding to the given variableIDlong
getLongValue
(@NonNull Enum<?> id) Returns the long value corresponding to the givenvariableID
Methods inherited from class microsim.statistics.functions.AbstractArrayFunction
apply, apply, applyFunction
Methods inherited from class microsim.statistics.functions.AbstractFunction
isCheckingTime, onEvent, setCheckingTime, updateSource
-
Field Details
-
lmax
protected long lmax
-
-
Constructor Details
-
Long
Creates a maximum function on a long array source.- Parameters:
source
- The data source.- Throws:
NullPointerException
- whensource
isnull
.
-
-
Method Details
-
apply
public void apply(long @NonNull [] data) Applies themax
function to the provided array.- Overrides:
apply
in classAbstractArrayFunction
- Parameters:
data
- A source array of values.- Throws:
NullPointerException
- whendata
isnull
.
-
getLongValue
Returns the long value corresponding to the givenvariableID
- Specified by:
getLongValue
in interfaceLongSource
- Parameters:
id
- A unique identifier for a variable.- Returns:
- The current long value of the required variable.
- Throws:
NullPointerException
- whenid
isnull
.
-
getDoubleValue
Returns the double value corresponding to the given variableID- Specified by:
getDoubleValue
in interfaceDoubleSource
- Parameters:
variableID
- A unique identifier for a variable.- Returns:
- The current double value of the required variable.
- Throws:
NullPointerException
- whenvariableID
isnull
.
-