Package dev.getelements.elements.rt
Interface RoundRobin<T>
- Type Parameters:
T
-
- All Superinterfaces:
Iterable<T>
- All Known Implementing Classes:
ConcurrentRoundRobin
Implements a round-robin data structure which will repeatedly select from a set of values ensuring an even
distribution across all values.
-
Method Summary
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getNext
T getNext()Gets the next object in thisRoundRobin
- Returns:
- the next object
-
set
Sets the objects at the supplied index.- Parameters:
index
- the indexobject
- the object
-
get
Gets the specific object at that index.- Parameters:
index
- the index- Returns:
- the object
-
stream
Gets aStream<T>
from thisRoundRobin<T>
.
-