Class MaxArrayFunction.Long

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

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

    • lmax

      protected long lmax
  • Constructor Details

    • Long

      public Long(@NonNull @NonNull LongArraySource source)
      Creates a maximum 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 max function to the provided array.
      Overrides:
      apply in class AbstractArrayFunction
      Parameters:
      data - A source array of values.
      Throws:
      NullPointerException - when data is null.
    • getLongValue

      public long getLongValue(@NonNull @NonNull 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.
      Throws:
      NullPointerException - when id is null.
    • getDoubleValue

      public double getDoubleValue(@NonNull @NonNull 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.
      Throws:
      NullPointerException - when variableID is null.