Interface RoundRobin<T>

Type Parameters:
T -
All Superinterfaces:
Iterable<T>
All Known Implementing Classes:
ConcurrentRoundRobin

public interface RoundRobin<T> extends Iterable<T>
Implements a round-robin data structure which will repeatedly select from a set of values ensuring an even distribution across all values.
  • Method Details

    • getNext

      T getNext()
      Gets the next object in this RoundRobin
      Returns:
      the next object
    • set

      T set(int index, T object)
      Sets the objects at the supplied index.
      Parameters:
      index - the index
      object - the object
    • get

      T get(int index)
      Gets the specific object at that index.
      Parameters:
      index - the index
      Returns:
      the object
    • stream

      Stream<T> stream()
      Gets a Stream<T> from this RoundRobin<T>.
      Returns:
      the Stream<T> of all elements