Class MinTraceFunction.Integer

All Implemented Interfaces:
EventListener, DoubleSource, IntSource, UpdatableSource
Enclosing class:
MinTraceFunction

public static class MinTraceFunction.Integer extends MinTraceFunction implements IntSource
An implementation of the Memoryless Series class, which manages integer type data sources.
  • Field Details

    • min

      protected int min
    • target

      protected IntSource target
  • Constructor Details

    • Integer

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

      public Integer(@NonNull @NonNull Object source, @NonNull @NonNull String valueName, boolean getFromMethod)
      Creates a basic statistic probe on a generic object.
      Parameters:
      source - A generic source object.
      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

    • applyFunction

      public void applyFunction()
      Reads the source values and update statistics.
      Overrides:
      applyFunction in class MinTraceFunction
    • getDoubleValue

      public double getDoubleValue(@NonNull @NonNull Enum<?> valueID)
      Returns the result of a given statistic.
      Specified by:
      getDoubleValue in interface DoubleSource
      Parameters:
      valueID - One of the MinTraceFunction.Variables constants representing available statistics.
      Returns:
      The computed value.
      Throws:
      NullPointerException - when valueID is null.
    • getIntValue

      public int getIntValue(@NonNull @NonNull Enum<?> valueID)
      Description copied from interface: IntSource
      Returns the integer value corresponding to the given variableID
      Specified by:
      getIntValue in interface IntSource
      Parameters:
      valueID - A unique identifier for a variable.
      Returns:
      The current integer value of the required variable.