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,ISourceObjectArray,IUpdatableSource,IWeightedLongArraySource
- Enclosing class:
- Weighted_CrossSection
public static class Weighted_CrossSection.Long
extends Weighted_CrossSection
implements IWeightedLongArraySource
-
Nested Class Summary
Nested classes/interfaces inherited from class microsim.statistics.weighted.Weighted_CrossSection
Weighted_CrossSection.Double, Weighted_CrossSection.Float, Weighted_CrossSection.Integer, Weighted_CrossSection.Long -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LongInvokerprotected Collection<? extends Weight>protected Enum<?>protected long[]protected double[]Fields inherited from class microsim.statistics.weighted.Weighted_CrossSection
filter, sourceList, timeChecker -
Constructor Summary
ConstructorsConstructorDescriptionLong(Collection<? extends Weight> source) Create a statistic probe on a collection of ILongSource objects.Long(Collection<? extends Weight> source, Class<? extends Weight> objectClass, String valueName, boolean getFromMethod) Create a basic statistic probe on a collection of objects.Long(Collection<? extends Weight> source, Enum<?> valueID) Create a statistic probe on a collection of ILongSource objects. -
Method Summary
Modifier and TypeMethodDescriptionlong[]Return the currently cached array of long values.double[]toString()voidForce the source to update its currently cached data.Methods inherited from class microsim.statistics.weighted.Weighted_CrossSection
getFilter, getSourceArray, isCheckingTime, onEvent, setCheckingTime, setFilter
-
Field Details
-
valueList
protected long[] valueList -
weights
protected double[] weights -
invoker
-
target
-
valueID
-
-
Constructor Details
-
Long
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
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(Collection<? extends Weight> source, Class<? extends Weight> objectClass, 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[] getLongArray()Description copied from interface:IWeightedLongArraySourceReturn the currently cached array of long values.- Specified by:
getLongArrayin interfaceIWeightedLongArraySource- Returns:
- An array of double or a null pointer if the source is empty.
-
toString
-
updateSource
public void updateSource()Description copied from interface:IUpdatableSourceForce the source to update its currently cached data.- Specified by:
updateSourcein interfaceIUpdatableSource- Specified by:
updateSourcein classWeighted_CrossSection
-
getWeights
public double[] getWeights()- Specified by:
getWeightsin interfaceIWeightedLongArraySource
-