Class ConstantValue<T>

Type Parameters:
T - the type
Direct Known Subclasses:
GetEpsilon, GetMaximumLength, GetMinimumStableIndex

public class ConstantValue<T> extends CachelessIndicator<T>
ConstantValue is an Indicator to provide a constant value for all indices.
  • Constructor Details

    • ConstantValue

      protected ConstantValue(Series<?> series, T constantValue)
  • Method Details

    • constantValue

      public static <T> ConstantValue<T> constantValue(Series<?> series, T constantValue)
      Parameters:
      series - the Indicator.getSeries()
      constantValue - the constant value
    • calculate

      protected T calculate(long index)
      Description copied from class: Indicator
      Performs the calculation of this Indicator at the given index.
      Specified by:
      calculate in class Indicator<T>
      Parameters:
      index - the index
      Returns:
      the result (never null)