Package microsim.statistics.weighted
Class Weighted_CrossSection.Integer
java.lang.Object
microsim.statistics.weighted.Weighted_CrossSection
microsim.statistics.weighted.Weighted_CrossSection.Integer
- All Implemented Interfaces:
EventListener
,SourceObjectArray
,UpdatableSource
,WeightedIntArraySource
- Enclosing class:
Weighted_CrossSection
public static class Weighted_CrossSection.Integer
extends Weighted_CrossSection
implements WeightedIntArraySource
-
Nested Class Summary
Nested classes/interfaces inherited from class microsim.statistics.weighted.Weighted_CrossSection
Weighted_CrossSection.Double, Weighted_CrossSection.Integer, Weighted_CrossSection.Long
-
Field Summary
Modifier and TypeFieldDescriptionprotected IntegerInvoker
protected Collection<? extends Weight>
protected Enum<?>
protected int[]
protected double[]
Fields inherited from class microsim.statistics.weighted.Weighted_CrossSection
filter, sourceList, timeChecker
-
Constructor Summary
ConstructorDescriptionInteger
(@NonNull Collection<? extends Weight> source) Create a statistic probe on a collection of IntSource objects.Integer
(@NonNull Collection<? extends Weight> source, @NonNull Class<? extends Weight> objectClass, @NonNull String valueName, boolean getFromMethod) Create a basic statistic probe on a collection of objects.Integer
(@NonNull Collection<? extends Weight> source, @NonNull Enum<?> valueID) Create a statistic probe on a collection of IntSource objects. -
Method Summary
Methods inherited from class microsim.statistics.weighted.Weighted_CrossSection
getSourceArray, isCheckingTime, onEvent, setCheckingTime
-
Field Details
-
valueList
protected int[] valueList -
weights
protected double[] weights -
invoker
-
target
-
valueID
-
-
Constructor Details
-
Integer
public Integer(@NonNull @NonNull Collection<? extends Weight> source, @NonNull @NonNull Enum<?> valueID) Create a statistic probe on a collection of IntSource objects.- Parameters:
source
- The collection containing IntSource object.valueID
- The value identifier defined by source object.
-
Integer
Create a statistic probe on a collection of IntSource objects. It uses the IntSource.DEFAULT variable id.- Parameters:
source
- The collection containing IntSource object.
-
Integer
public Integer(@NonNull @NonNull Collection<? extends Weight> source, @NonNull @NonNull Class<? extends Weight> objectClass, @NonNull @NonNull String valueName, boolean getFromMethod) Create 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.
-
-
Method Details
-
getIntArray
public int @NonNull [] getIntArray()Description copied from interface:WeightedIntArraySource
Return the currently cached array of integer values.- Specified by:
getIntArray
in interfaceWeightedIntArraySource
- Returns:
- An array of double or a null pointer if the source is empty.
-
toString
-
updateSource
public void updateSource()Description copied from interface:UpdatableSource
Forces the source to update its currently cached data.- Specified by:
updateSource
in interfaceUpdatableSource
- Specified by:
updateSource
in classWeighted_CrossSection
-
getWeights
public double @NonNull [] getWeights()- Specified by:
getWeights
in interfaceWeightedIntArraySource
-