Class RoundRobin<T>
java.lang.Object
dev.getelements.elements.sdk.model.util.RoundRobin<T>
- Type Parameters:
T-
- All Implemented Interfaces:
Iterable<T>
Allows for round-robin iteration of a list of objects in a thread safe.
-
Constructor Summary
ConstructorsConstructorDescriptionRoundRobin(Collection<T> collection) Constructs aRoundRobin<T>from the suppliedCollection<T>RoundRobin(Stream<T> stream) Constructs aRoundRobin<T>from the suppliedCollection<T> -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RoundRobin
Constructs aRoundRobin<T>from the suppliedCollection<T>- Parameters:
stream- theStream<T>backing thisRoundRobin<T>
-
RoundRobin
Constructs aRoundRobin<T>from the suppliedCollection<T>- Parameters:
collection- theCollection<T>backing thisRoundRobin<T>
-
-
Method Details