Package microsim.statistics
Class CrossSection.Double
java.lang.Object
microsim.statistics.CrossSection
microsim.statistics.CrossSection.Double
- All Implemented Interfaces:
EventListener,DoubleArraySource,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
FieldsModifier and TypeFieldDescriptionprotected DoubleInvokerprotected Collection<?>protected Enum<?>protected double[]Fields inherited from class microsim.statistics.CrossSection
filter, sourceArray, timeChecker -
Constructor Summary
ConstructorsConstructorDescriptionDouble(@NonNull Collection<?> source) Creates a statistic probe on a collection ofDoubleSourceobjects.Double(@NonNull Collection<?> source, @NonNull Class<?> objectClass, @NonNull String valueName, boolean getFromMethod) Creates a basic statistic probe on a collection of objects.Double(@NonNull Collection<?> source, @NonNull Enum<?> valueID) Creates a statistic probe on a collection ofDoubleSourceobjects. -
Method Summary
Methods inherited from class microsim.statistics.CrossSection
isCheckingTime, onEvent, setCheckingTimeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface microsim.statistics.SourceObjectArray
getSourceArray
-
Field Details
-
valueList
protected double[] valueList -
invoker
-
target
-
valueID
-
-
Constructor Details
-
Double
Creates a statistic probe on a collection ofDoubleSourceobjects.- Parameters:
source- The collection containingDoubleSourceobject.valueID- The value identifier defined by source object.- Throws:
NullPointerException- when any of the input parameters isnull.
-
Double
Creates a statistic probe on a collection ofDoubleSourceobjects. It uses theDoubleSource.Variables.DEFAULTvariable id.- Parameters:
source- The collection containingDoubleSourceobject.- Throws:
NullPointerException- whensourceisnull.
-
Double
public Double(@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
-
getDoubleArray
public double @NonNull [] getDoubleArray()Description copied from interface:DoubleArraySourceReturns the currently cached array of double values.- Specified by:
getDoubleArrayin interfaceDoubleArraySource- Returns:
- An array of double or a null pointer if the source is empty.
-
toString
-
updateSource
public void updateSource()Updates the state of the object when it's not up-to-date.- Specified by:
updateSourcein interfaceUpdatableSource- Specified by:
updateSourcein classCrossSection
-