Package microsim.statistics
Class CrossSection
java.lang.Object
microsim.statistics.CrossSection
- All Implemented Interfaces:
EventListener,SourceObjectArray,UpdatableSource
- Direct Known Subclasses:
CrossSection.Double,CrossSection.Integer,CrossSection.Long
public abstract class CrossSection
extends Object
implements EventListener, UpdatableSource, SourceObjectArray
A cross-section is a collection of values each of them representing the status of a given variable of an element of a
collection of agents.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CollectionFilterprotected Object[]protected TimeChecker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the current status of the time checker.voidEventListenercallback function.voidsetCheckingTime(boolean b) Sets the current status of the time checker.abstract voidForces the source to update its currently cached data.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface microsim.statistics.SourceObjectArray
getSourceArray
-
Field Details
-
sourceArray
-
timeChecker
-
filter
-
-
Constructor Details
-
CrossSection
public CrossSection()
-
-
Method Details
-
updateSource
public abstract void updateSource()Description copied from interface:UpdatableSourceForces the source to update its currently cached data.- Specified by:
updateSourcein interfaceUpdatableSource
-
onEvent
EventListenercallback function. It supports onlyCommonEventType.UPDATEevent.- Specified by:
onEventin interfaceEventListener- Parameters:
type- The action id. OnlyCommonEventType.UPDATEis supported.- Throws:
UnsupportedOperationException- If actionType is not supported.
-
isCheckingTime
public boolean isCheckingTime()Returns the current status of the time checker. A time checker avoid the object to update more than one time per simulation step. The default value is enabled (true).- Returns:
- True if the computer is currently checking time before update cached data, false if disabled.
-
setCheckingTime
public void setCheckingTime(boolean b) Sets the current status of the time checker. A time checker avoid the object to update more than one time per simulation step. The default value is enabled (true).- Parameters:
b- True if the computer is currently checking time before update cached data, false if disabled.
-