Class RateLimit
java.lang.Object
com.stuypulse.stuylib.streams.numbers.filters.RateLimit
- All Implemented Interfaces:
IFilter
This class lets you rate limit a stream of inputs
Instead of being based on the rate that update is called, the value you give it is based on how much it should be able to change in one second.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
get
(double next) Get next value in Filter based on the next value given
-
Constructor Details
-
RateLimit
- Parameters:
rateLimit
- The amount that the value should be able to change in one second.
-
-
Method Details