public static final class LinearTracker.Builder
extends java.lang.Object
LinearTracker
object.Modifier and Type | Method and Description |
---|---|
LinearTracker |
build()
Builds a
LinearTracker block. |
LinearTracker.Builder |
optMaxUpdates(int maxUpdates)
Sets the maximum number of updates after which the value should remain constant.
|
LinearTracker.Builder |
optMaxValue(float max)
Sets the maximum value for a positive slope.
|
LinearTracker.Builder |
optMinValue(float min)
Sets the minimum value for a negative slope.
|
LinearTracker.Builder |
optSlope(float slope)
Sets the value of the linear slope.
|
LinearTracker.Builder |
setBaseValue(float baseValue)
Sets the initial value after no steps.
|
public LinearTracker.Builder setBaseValue(float baseValue)
baseValue
- the initial valueBuilder
public LinearTracker.Builder optSlope(float slope)
Use a positive number for an increasing value and negative for decreasing.
slope
- the value of the linear slopeBuilder
public LinearTracker.Builder optMaxValue(float max)
This is equivalent to the max updates. Only one can be set.
max
- the max valueBuilder
public LinearTracker.Builder optMinValue(float min)
This is equivalent to the max updates. Only one can be set.
min
- the minimum valueBuilder
public LinearTracker.Builder optMaxUpdates(int maxUpdates)
maxUpdates
- the maximum number of updates after which the value should remain
constantBuilder
public LinearTracker build()
LinearTracker
block.LinearTracker
block