Package microsim.statistics
Class CrossSection.Long
java.lang.Object
microsim.statistics.CrossSection
microsim.statistics.CrossSection.Long
- All Implemented Interfaces:
EventListener
,LongArraySource
,SourceObjectArray
,UpdatableSource
- Enclosing class:
CrossSection
-
Nested Class Summary
Nested classes/interfaces inherited from class microsim.statistics.CrossSection
CrossSection.Double, CrossSection.Integer, CrossSection.Long
-
Field Summary
Modifier and TypeFieldDescriptionprotected LongInvoker
protected Collection<?>
protected Enum<?>
protected long[]
Fields inherited from class microsim.statistics.CrossSection
filter, sourceArray, timeChecker
-
Constructor Summary
ConstructorDescriptionLong
(@NonNull Collection<?> source) Creates a statistic probe on a collection of LongSource objects.Long
(@NonNull Collection<?> source, @NonNull Class<?> objectClass, @NonNull String valueName, boolean getFromMethod) Creates a basic statistic probe on a collection of objects.Long
(@NonNull Collection<?> source, @NonNull Enum<?> valueID) Creates a statistic probe on a collection ofLongSource
objects. -
Method Summary
Modifier and TypeMethodDescriptiondouble @NonNull []
long @NonNull []
Returns the currently cached array of long values.toString()
void
Updates the state of the object when it's not up-to-date.Methods inherited from class microsim.statistics.CrossSection
isCheckingTime, onEvent, setCheckingTime
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface microsim.statistics.SourceObjectArray
getSourceArray
-
Field Details
-
valueList
protected long[] valueList -
invoker
-
target
-
valueID
-
-
Constructor Details
-
Long
Creates a statistic probe on a collection ofLongSource
objects.- Parameters:
source
- The collection containingLongSource
object.valueID
- The value identifier defined by source object.- Throws:
NullPointerException
- when any of the input parameters isnull
.
-
Long
Creates a statistic probe on a collection of LongSource objects. It uses theLongSource.Variables.DEFAULT
variable id.- Parameters:
source
- The collection containingLongSource
object.- Throws:
NullPointerException
- whensource
isnull
.
-
Long
public Long(@NonNull @NonNull Collection<?> source, @NonNull @NonNull Class<?> objectClass, @NonNull @NonNull String valueName, boolean getFromMethod) Creates a basic statistic probe on a collection of objects.- Parameters:
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.- Throws:
NullPointerException
- when any of the input parameters isnull
.
-
-
Method Details
-
getLongArray
public long @NonNull [] getLongArray()Description copied from interface:LongArraySource
Returns the currently cached array of long values.- Specified by:
getLongArray
in interfaceLongArraySource
- Returns:
- An array of long or a null pointer if the source is empty.
-
getDoubleArray
public double @NonNull [] getDoubleArray() -
toString
-
updateSource
public void updateSource()Updates the state of the object when it's not up-to-date.- Specified by:
updateSource
in interfaceUpdatableSource
- Specified by:
updateSource
in classCrossSection
-