Generator

interface Generator<out T> : Iterator<Pair<T, Duration>>

Generates an infinite iterator over instances T and delays between their emissions by a node that generates traffic, i.e., com.group7.nodes.ArrivalNode.

Generators can then be truncated with .take(n) for a finite iterator.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract operator fun hasNext(): Boolean
Link copied to clipboard
abstract operator fun next(): Pair<T, Duration>
Link copied to clipboard
fun <T> Generator<T>.take(n: Int): Generator<T>

Constraints the generator to only emit a limited number of entities.