Class SumArrayFunction.Long

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

public static class SumArrayFunction.Long extends SumArrayFunction implements LongSource
SumFunction operating on long source values.
  • Field Details

    • lsum

      protected long lsum
  • Constructor Details

    • Long

      public Long(@NonNull @NonNull LongArraySource source)
      Create a sum function on a long array source.
      Parameters:
      source - The data source.
      Throws:
      NullPointerException - when source is null.
  • Method Details

    • apply

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

      public long getLongValue(@Nullable @Nullable Enum<?> id)
      Returns the long value corresponding to the given variableID
      Specified by:
      getLongValue in interface LongSource
      Parameters:
      id - A unique identifier for a variable.
      Returns:
      The current long 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.