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,IDoubleSource,ILongSource,IUpdatableSource
- Enclosing class:
- MaxTraceFunction
An implementation of the MemorylessSeries class, which manages long type data sources.
- Author:
- Michele Sonnessa
-
Nested Class Summary
Nested classes/interfaces inherited from class microsim.statistics.functions.MaxTraceFunction
MaxTraceFunction.Double, MaxTraceFunction.Float, MaxTraceFunction.Integer, MaxTraceFunction.Long, MaxTraceFunction.VariablesNested classes/interfaces inherited from interface microsim.statistics.ILongSource
ILongSource.Variables -
Field Summary
FieldsFields inherited from class microsim.statistics.functions.MaxTraceFunction
countFields inherited from class microsim.statistics.functions.AbstractFunction
timeChecker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRead the source values and update statistics.doublegetDoubleValue(Enum<?> valueID) Return the result of a given statistic.longReturn the last double value read from the source object.longgetLongValue(Enum<?> valueID) Return the result of a given statistic.longgetMax()The current maximum value.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
Create a basic statistic probe on a IDblSource object.- Parameters:
source- The ILongSource object.valueID- The value identifier defined by source object.
-
Long
Create 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.
-
-
Method Details
-
applyFunction
public void applyFunction()Read the source values and update statistics.- Overrides:
applyFunctionin classMaxTraceFunction
-
getDoubleValue
Return the result of a given statistic.- Specified by:
getDoubleValuein interfaceIDoubleSource- Parameters:
valueID- One of the F_ constants representing available statistics.- Returns:
- The computed value.
- Throws:
UnsupportedOperationException- If the given valueID is not supported.
-
getLongValue
Return the result of a given statistic.- Specified by:
getLongValuein interfaceILongSource- Parameters:
valueID- One of the F_ constants representing available statistics.- Returns:
- The computed value.
- Throws:
UnsupportedOperationException- If the given valueID is not supported.
-
getLastValue
public long getLastValue()Return the last double value read from the source object.- Returns:
- A double value collected at the last reading operation.
-
getMax
public long getMax()The current maximum value.- Returns:
- The maximum value.
-