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
,ISourceObjectArray
,IUpdatableSource
,IWeightedIntArraySource
- Enclosing class:
- Weighted_CrossSection
public static class Weighted_CrossSection.Integer extends Weighted_CrossSection implements IWeightedIntArraySource
-
-
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
-
-
Constructor Summary
Constructors Constructor Description Integer(java.util.Collection<? extends Weight> source)
Create a statistic probe on a collection of IIntSource objects.Integer(java.util.Collection<? extends Weight> source, java.lang.Class<? extends Weight> objectClass, java.lang.String valueName, boolean getFromMethod)
Create a basic statistic probe on a collection of objects.Integer(java.util.Collection<? extends Weight> source, java.lang.Enum<?> valueID)
Create a statistic probe on a collection of IIntSource objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
getIntArray()
Return the currently cached array of integer values.double[]
getWeights()
java.lang.String
toString()
void
updateSource()
Force the source to update its currently cached data.-
Methods inherited from class microsim.statistics.weighted.Weighted_CrossSection
getFilter, getSourceArray, isCheckingTime, onEvent, setCheckingTime, setFilter
-
-
-
-
Constructor Detail
-
Integer
public Integer(java.util.Collection<? extends Weight> source, java.lang.Enum<?> valueID)
Create a statistic probe on a collection of IIntSource objects.- Parameters:
source
- The collection containing IIntSource object.valueID
- The value identifier defined by source object.
-
Integer
public Integer(java.util.Collection<? extends Weight> source)
Create a statistic probe on a collection of IIntSource objects. It uses the IIntSource.DEFAULT variable id.- Parameters:
source
- The collection containing IIntSource object.
-
Integer
public Integer(java.util.Collection<? extends Weight> source, java.lang.Class<? extends Weight> objectClass, java.lang.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 Detail
-
getIntArray
public int[] getIntArray()
Description copied from interface:IWeightedIntArraySource
Return the currently cached array of integer values.- Specified by:
getIntArray
in interfaceIWeightedIntArraySource
- Returns:
- An array of double or a null pointer if the source is empty.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
updateSource
public void updateSource()
Description copied from interface:IUpdatableSource
Force the source to update its currently cached data.- Specified by:
updateSource
in interfaceIUpdatableSource
- Specified by:
updateSource
in classWeighted_CrossSection
-
getWeights
public double[] getWeights()
- Specified by:
getWeights
in interfaceIWeightedIntArraySource
-
-