Class MinTraceFunction.Integer

All Implemented Interfaces:
EventListener, IDoubleSource, IIntSource, IUpdatableSource
Enclosing class:
MinTraceFunction

public static class MinTraceFunction.Integer extends MinTraceFunction implements IIntSource
An implementation of the MemorylessSeries class, which manages integer type data sources.
Author:
Michele Sonnessa and Ross Richardson
  • Field Details

    • min

      protected int min
    • target

      protected IIntSource target
  • Constructor Details

    • Integer

      public Integer(IIntSource source, Enum<?> valueID)
      Create a basic statistic probe on a IDblSource object.
      Parameters:
      source - The IDblSource object.
      valueID - The value identifier defined by source object.
    • Integer

      public Integer(Object source, String valueName, boolean getFromMethod)
      Create 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.
  • Method Details

    • applyFunction

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

      public double getDoubleValue(Enum<?> valueID)
      Return the result of a given statistic.
      Specified by:
      getDoubleValue in interface IDoubleSource
      Parameters:
      valueID - One of the F_ constants representing available statistics.
      Returns:
      The computed value.
      Throws:
      UnsupportedOperationException - If the given valueID is not supported.
    • getIntValue

      public int getIntValue(Enum<?> valueID)
      Description copied from interface: IIntSource
      Return the integer value corresponding to the given variableID
      Specified by:
      getIntValue in interface IIntSource
      Returns:
      The current integer value of the required variable.
    • getLastValue

      public int getLastValue()
      Return the last double value read from the source object.
      Returns:
      A double value collected at the last reading operation.
    • getMin

      public int getMin()
      The minimum function.
      Returns:
      The minimum value.