Package microsim.statistics.functions
Class MaxTraceFunction.Long
java.lang.Object
microsim.statistics.functions.AbstractFunction
microsim.statistics.functions.MaxTraceFunction
microsim.statistics.functions.MaxTraceFunction.Long
- All Implemented Interfaces:
EventListener,DoubleSource,LongSource,UpdatableSource
- Enclosing class:
MaxTraceFunction
An implementation of the Memoryless Series class, which manages long type data sources.
-
Nested Class Summary
Nested classes/interfaces inherited from class microsim.statistics.functions.MaxTraceFunction
MaxTraceFunction.Double, MaxTraceFunction.Integer, MaxTraceFunction.Long, MaxTraceFunction.VariablesNested classes/interfaces inherited from interface microsim.statistics.LongSource
LongSource.Variables -
Field Summary
FieldsFields inherited from class microsim.statistics.functions.MaxTraceFunction
countFields inherited from class microsim.statistics.functions.AbstractFunction
timeChecker -
Constructor Summary
ConstructorsConstructorDescriptionCreates a basic statistic probe on a generic object.Long(@NonNull LongSource source, @NonNull Enum<?> valueID) Creates a basic statistic probe on aLongSourceobject. -
Method Summary
Modifier and TypeMethodDescriptionvoidReads the source values and update statistics.doublegetDoubleValue(@NonNull Enum<?> valueID) Returns the result of a given statistic.longgetLongValue(@NonNull Enum<?> valueID) Returns the result of a given statistic.Methods inherited from class microsim.statistics.functions.MaxTraceFunction
onEventMethods inherited from class microsim.statistics.functions.AbstractFunction
isCheckingTime, setCheckingTime, updateSource
-
Field Details
-
max
protected long max -
target
-
-
Constructor Details
-
Long
Creates a basic statistic probe on aLongSourceobject.- Parameters:
source- TheLongSourceobject.valueID- The value identifier defined by source object.- Throws:
NullPointerException- when any of the input parameters isnull.
-
Long
public Long(@NonNull @NonNull Object source, @NonNull @NonNull String valueName, boolean getFromMethod) Creates a basic statistic probe on a generic object.- Parameters:
source- A generic source object.valueName- The name of the field or the method returning the variable to be probed.getFromMethod- Specifies if valueName is a method or a property value.- Throws:
NullPointerException- when any of the input parameters isnull.
-
-
Method Details
-
applyFunction
public void applyFunction()Reads the source values and update statistics.- Overrides:
applyFunctionin classMaxTraceFunction
-
getDoubleValue
Returns the result of a given statistic.- Specified by:
getDoubleValuein interfaceDoubleSource- Parameters:
valueID- One of theMaxTraceFunction.Variablesconstants representing available statistics.- Returns:
- The computed value.
- Throws:
NullPointerException- whenvalueIdisnull.
-
getLongValue
Returns the result of a given statistic.- Specified by:
getLongValuein interfaceLongSource- Parameters:
valueID- One of theMaxTraceFunction.Variablesconstants representing available statistics.- Returns:
- The computed value.
- Throws:
NullPointerException- whenvalueIDisnull.
-