Class CrossSection.Integer

java.lang.Object
microsim.statistics.CrossSection
microsim.statistics.CrossSection.Integer
All Implemented Interfaces:
EventListener, IntArraySource, SourceObjectArray, UpdatableSource
Enclosing class:
CrossSection

public static class CrossSection.Integer extends CrossSection implements IntArraySource
  • Field Details

    • valueList

      protected int[] valueList
    • invoker

      protected IntegerInvoker invoker
    • target

      protected Collection<?> target
    • valueID

      protected Enum<?> valueID
  • Constructor Details

    • Integer

      public Integer(@NonNull @NonNull Collection<?> source, @NonNull @NonNull Enum<?> valueID)
      Creates a statistic probe on a collection of IntSource objects.
      Parameters:
      source - The collection containing IntSource object.
      valueID - The value identifier defined by source object.
      Throws:
      NullPointerException - when any of the input parameters is null.
    • Integer

      public Integer(@NonNull @NonNull Collection<?> source)
      Create a statistic probe on a collection of IntSource objects. It uses the IntSource.Variables.DEFAULT variable id.
      Parameters:
      source - The collection containing IntSource object.
      Throws:
      NullPointerException - when source is null.
    • Integer

      public Integer(@NonNull @NonNull Collection<?> source, @NonNull @NonNull Class<?> 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.
      Throws:
      NullPointerException - when any of the input parameters is null.
  • Method Details

    • getIntArray

      public int @NonNull [] getIntArray()
      Description copied from interface: IntArraySource
      Returns a particular array of integer values.
      Specified by:
      getIntArray in interface IntArraySource
      Returns:
      an array of integer.
    • getDoubleArray

      public double @NonNull [] getDoubleArray()
    • toString

      @NonNull public @NonNull String toString()
      Overrides:
      toString in class Object
    • updateSource

      public void updateSource()
      Updates the state of the object when it's not up-to-date.
      Specified by:
      updateSource in interface UpdatableSource
      Specified by:
      updateSource in class CrossSection