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.LongNested classes/interfaces inherited from interface microsim.statistics.DoubleSource
DoubleSource.VariablesNested classes/interfaces inherited from interface microsim.statistics.LongSource
LongSource.Variables -
Field Summary
FieldsFields inherited from class microsim.statistics.functions.AbstractArrayFunction
dblSource, intSource, lngSource, type, TYPE_DBL, TYPE_INT, TYPE_LNGFields inherited from class microsim.statistics.functions.AbstractFunction
timeChecker -
Constructor Summary
ConstructorsConstructorDescriptionLong(@NonNull LongArraySource source) Creates a maximum function on a long array source. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(long @NonNull [] data) Applies themaxfunction to the provided array.doublegetDoubleValue(@NonNull Enum<?> variableID) Returns the double value corresponding to the given variableIDlonggetLongValue(@NonNull Enum<?> id) Returns the long value corresponding to the givenvariableIDMethods inherited from class microsim.statistics.functions.AbstractArrayFunction
apply, apply, applyFunctionMethods 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- whensourceisnull.
-
-
Method Details
-
apply
public void apply(long @NonNull [] data) Applies themaxfunction to the provided array.- Overrides:
applyin classAbstractArrayFunction- Parameters:
data- A source array of values.- Throws:
NullPointerException- whendataisnull.
-
getLongValue
Returns the long value corresponding to the givenvariableID- Specified by:
getLongValuein interfaceLongSource- Parameters:
id- A unique identifier for a variable.- Returns:
- The current long value of the required variable.
- Throws:
NullPointerException- whenidisnull.
-
getDoubleValue
Returns the double value corresponding to the given variableID- Specified by:
getDoubleValuein interfaceDoubleSource- Parameters:
variableID- A unique identifier for a variable.- Returns:
- The current double value of the required variable.
- Throws:
NullPointerException- whenvariableIDisnull.
-