Class LinearTracker.Builder

  • Enclosing class:
    LinearTracker

    public static final class LinearTracker.Builder
    extends java.lang.Object
    The Builder to construct an LinearTracker object.
    • Method Detail

      • setBaseValue

        public LinearTracker.Builder setBaseValue​(float baseValue)
        Sets the initial value after no steps.
        Parameters:
        baseValue - the initial value
        Returns:
        this Builder
      • optSlope

        public LinearTracker.Builder optSlope​(float slope)
        Sets the value of the linear slope.

        Use a positive number for an increasing value and negative for decreasing.

        Parameters:
        slope - the value of the linear slope
        Returns:
        this Builder
      • optMaxValue

        public LinearTracker.Builder optMaxValue​(float max)
        Sets the maximum value for a positive slope.

        This is equivalent to the max updates. Only one can be set.

        Parameters:
        max - the max value
        Returns:
        this Builder
      • optMinValue

        public LinearTracker.Builder optMinValue​(float min)
        Sets the minimum value for a negative slope.

        This is equivalent to the max updates. Only one can be set.

        Parameters:
        min - the minimum value
        Returns:
        this Builder
      • optMaxUpdates

        public LinearTracker.Builder optMaxUpdates​(int maxUpdates)
        Sets the maximum number of updates after which the value should remain constant.
        Parameters:
        maxUpdates - the maximum number of updates after which the value should remain constant
        Returns:
        this Builder