Package microsim.statistics.weighted
Class Weighted_CrossSection.Long
java.lang.Object
microsim.statistics.weighted.Weighted_CrossSection
microsim.statistics.weighted.Weighted_CrossSection.Long
- All Implemented Interfaces:
EventListener
,SourceObjectArray
,UpdatableSource
,WeightedLongArraySource
- Enclosing class:
Weighted_CrossSection
public static class Weighted_CrossSection.Long
extends Weighted_CrossSection
implements WeightedLongArraySource
-
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 LongInvoker
protected Collection<? extends Weight>
protected Enum<?>
protected long[]
protected double[]
Fields inherited from class microsim.statistics.weighted.Weighted_CrossSection
filter, sourceList, timeChecker
-
Constructor Summary
ConstructorDescriptionLong
(@NonNull Collection<? extends Weight> source) Create a statistic probe on a collection of LongSource objects.Long
(@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.Long
(@NonNull Collection<? extends Weight> source, @NonNull Enum<?> valueID) Create a statistic probe on a collection of LongSource objects. -
Method Summary
Methods inherited from class microsim.statistics.weighted.Weighted_CrossSection
getSourceArray, isCheckingTime, onEvent, setCheckingTime
-
Field Details
-
valueList
protected long[] valueList -
weights
protected double[] weights -
invoker
-
target
-
valueID
-
-
Constructor Details
-
Long
public Long(@NonNull @NonNull Collection<? extends Weight> source, @NonNull @NonNull Enum<?> valueID) Create a statistic probe on a collection of LongSource objects.- Parameters:
source
- The collection containing LongSource object.valueID
- The value identifier defined by source object.
-
Long
Create a statistic probe on a collection of LongSource objects. It uses the LongSource.DEFAULT variable id.- Parameters:
source
- The collection containing LongSource object.
-
Long
public Long(@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
-
getLongArray
public long @NonNull [] getLongArray()Description copied from interface:WeightedLongArraySource
Return the currently cached array of long values.- Specified by:
getLongArray
in interfaceWeightedLongArraySource
- 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 interfaceWeightedLongArraySource
-