Class SumArrayFunction.Integer

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

public static class SumArrayFunction.Integer extends SumArrayFunction implements IntSource
SumFunction operating on integer source values.
  • Field Details

    • isum

      protected int isum
  • Constructor Details

    • Integer

      public Integer(@NonNull @NonNull IntArraySource source)
      Create a sum function on an integer array source.
      Parameters:
      source - The data source.
      Throws:
      NullPointerException - when source is null.
  • Method Details

    • apply

      public void apply(int @NonNull [] data)
      Applies the function to the given array of integer values.
      Overrides:
      apply in class AbstractArrayFunction
      Parameters:
      data - A source array of values.
      Throws:
      NullPointerException - when data is null.
    • getIntValue

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

      public double getDoubleValue(@Nullable @Nullable Enum<?> variableID)
      Returns the double value corresponding to the given variableID
      Specified by:
      getDoubleValue in interface DoubleSource
      Parameters:
      variableID - A unique identifier for a variable.
      Returns:
      The current double value of the required variable.