Package microsim.statistics
Class CrossSection.Long
- java.lang.Object
-
- microsim.statistics.CrossSection
-
- microsim.statistics.CrossSection.Long
-
- All Implemented Interfaces:
EventListener
,ILongArraySource
,ISourceObjectArray
,IUpdatableSource
- Enclosing class:
- CrossSection
public static class CrossSection.Long extends CrossSection implements ILongArraySource
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class microsim.statistics.CrossSection
CrossSection.Double, CrossSection.Float, CrossSection.Integer, CrossSection.Long
-
-
Constructor Summary
Constructors Constructor Description Long(java.util.Collection<?> source)
Create a statistic probe on a collection of ILongSource objects.Long(java.util.Collection<?> source, java.lang.Class<?> objectClass, java.lang.String valueName, boolean getFromMethod)
Create a basic statistic probe on a collection of objects.Long(java.util.Collection<?> source, java.lang.Enum<?> valueID)
Create a statistic probe on a collection of ILongSource objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getDoubleArray()
long[]
getLongArray()
Return the currently cached array of long values.java.lang.String
toString()
void
updateSource()
Force the source to update its currently cached data.-
Methods inherited from class microsim.statistics.CrossSection
getFilter, getSourceArray, isCheckingTime, onEvent, setCheckingTime, setFilter
-
-
-
-
Constructor Detail
-
Long
public Long(java.util.Collection<?> source, java.lang.Enum<?> valueID)
Create a statistic probe on a collection of ILongSource objects.- Parameters:
source
- The collection containing ILongSource object.valueID
- The value identifier defined by source object.
-
Long
public Long(java.util.Collection<?> source)
Create a statistic probe on a collection of ILongSource objects. It uses the ILongSource.DEFAULT variable id.- Parameters:
source
- The collection containing ILongSource object.
-
Long
public Long(java.util.Collection<?> source, java.lang.Class<?> objectClass, java.lang.String valueName, boolean getFromMethod)
Create a basic statistic probe on a collection of objects.- Parameters:
name
- Name of the statistic object.source
- A collection of generic objects.objectClass
- The class of the objects contained by collection source.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 Detail
-
getLongArray
public long[] getLongArray()
Description copied from interface:ILongArraySource
Return the currently cached array of long values.- Specified by:
getLongArray
in interfaceILongArraySource
- Returns:
- An array of long or a null pointer if the source is empty.
-
getDoubleArray
public double[] getDoubleArray()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
updateSource
public void updateSource()
Description copied from interface:IUpdatableSource
Force the source to update its currently cached data.- Specified by:
updateSource
in interfaceIUpdatableSource
- Specified by:
updateSource
in classCrossSection
-
-