Class Weighted_CrossSection

java.lang.Object
microsim.statistics.weighted.Weighted_CrossSection
All Implemented Interfaces:
EventListener, SourceObjectArray, UpdatableSource
Direct Known Subclasses:
Weighted_CrossSection.Double, Weighted_CrossSection.Integer, Weighted_CrossSection.Long

public abstract class Weighted_CrossSection extends Object implements EventListener, UpdatableSource, SourceObjectArray
A weighted cross-section is a collection of values each of them representing the status of a given variable of a weighted element of a collection of agents.
  • Field Details

  • Constructor Details

    • Weighted_CrossSection

      public Weighted_CrossSection()
  • Method Details

    • updateSource

      public abstract void updateSource()
      Description copied from interface: UpdatableSource
      Forces the source to update its currently cached data.
      Specified by:
      updateSource in interface UpdatableSource
    • onEvent

      public void onEvent(@NonNull @NonNull Enum<?> type)
      EventListener callback function. It supports only CommonEventType.UPDATE event.
      Specified by:
      onEvent in interface EventListener
      Parameters:
      type - The action id. Only CommonEventType.UPDATE is supported.
      Throws:
      UnsupportedOperationException - If actionType is not supported.
    • getSourceArray

      @NonNull public @NonNull Object[] getSourceArray()
      Specified by:
      getSourceArray in interface SourceObjectArray
    • isCheckingTime

      public boolean isCheckingTime()
      Return 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)
      Set 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.