vertx / io.vertx.core.spi.cluster / ChoosableIterable

ChoosableIterable

interface ChoosableIterable<T : Any> : MutableIterable<T>

An extension of Iterable which allows keeps track of an iterator internally to allow the next element to be chosen

Author
Tim Fox

Functions

choose

abstract fun choose(): T

Return the next element T in a round robin fashion. The implementation should internally maintain some state which allows the next element to be returned

isEmpty

abstract fun isEmpty(): Boolean

Is it empty?