Package guru.mikelue.foxglove.functional
Class RoundRobinValueSupplier<T>
java.lang.Object
guru.mikelue.foxglove.functional.RoundRobinValueSupplier<T>
- Type Parameters:
T- The type of value supplied
- All Implemented Interfaces:
StatefulSupplier<T>,Supplier<T>
Supplies values in round-robin manner from the given list.
-
Method Summary
Modifier and TypeMethodDescriptionget()static <T> RoundRobinValueSupplier<T> Constructs the supplier with at least two values from the given list.static <T> RoundRobinValueSupplier<T> Constructs the supplier with at least two values from the given stream.static <T> RoundRobinValueSupplier<T> of(T... values) Constructs the supplier with at least two values.
-
Method Details
-
of
Constructs the supplier with at least two values.- Type Parameters:
T- The type of value supplied- Parameters:
values- The values to be supplied in round-robin manner- Returns:
- The constructed supplier
- See Also:
-
of
Constructs the supplier with at least two values from the given stream.- Type Parameters:
T- The type of value supplied- Parameters:
values- The stream of values- Returns:
- The constructed supplier
- See Also:
-
of
Constructs the supplier with at least two values from the given list.- Type Parameters:
T- The type of value supplied- Parameters:
values- The list of values- Returns:
- The constructed supplier
- See Also:
-
get
-