Package microsim.statistics.functions
Class MinTraceFunction.Integer
java.lang.Object
microsim.statistics.functions.AbstractFunction
microsim.statistics.functions.MinTraceFunction
microsim.statistics.functions.MinTraceFunction.Integer
- All Implemented Interfaces:
EventListener
,DoubleSource
,IntSource
,UpdatableSource
- Enclosing class:
MinTraceFunction
An implementation of the Memoryless Series class, which manages integer type data sources.
-
Nested Class Summary
Nested classes/interfaces inherited from class microsim.statistics.functions.MinTraceFunction
MinTraceFunction.Double, MinTraceFunction.Integer, MinTraceFunction.Long, MinTraceFunction.Variables
Nested classes/interfaces inherited from interface microsim.statistics.IntSource
IntSource.Variables
-
Field Summary
Fields inherited from class microsim.statistics.functions.MinTraceFunction
count
Fields inherited from class microsim.statistics.functions.AbstractFunction
timeChecker
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Reads the source values and update statistics.double
getDoubleValue
(@NonNull Enum<?> valueID) Returns the result of a given statistic.int
getIntValue
(@NonNull Enum<?> valueID) Returns the integer value corresponding to the givenvariableID
Methods inherited from class microsim.statistics.functions.MinTraceFunction
onEvent
Methods inherited from class microsim.statistics.functions.AbstractFunction
isCheckingTime, setCheckingTime, updateSource
-
Field Details
-
min
protected int min -
target
-
-
Constructor Details
-
Integer
Creates a basic statistic probe on aDoubleSource
object.- Parameters:
source
- TheDoubleSource
object.valueID
- The value identifier defined by source object.- Throws:
NullPointerException
- when any of the input parameters isnull
.
-
Integer
public Integer(@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:
applyFunction
in classMinTraceFunction
-
getDoubleValue
Returns the result of a given statistic.- Specified by:
getDoubleValue
in interfaceDoubleSource
- Parameters:
valueID
- One of theMinTraceFunction.Variables
constants representing available statistics.- Returns:
- The computed value.
- Throws:
NullPointerException
- whenvalueID
isnull
.
-
getIntValue
Description copied from interface:IntSource
Returns the integer value corresponding to the givenvariableID
- Specified by:
getIntValue
in interfaceIntSource
- Parameters:
valueID
- A unique identifier for a variable.- Returns:
- The current integer value of the required variable.
-