Kactoos

kactoos-jvm / nnl.rocks.kactoos.iterator / SyncIterator

SyncIterator

class SyncIterator<out T> : Iterator<T>

Synchronized Iterator.

Parameters

T - The type of the iterator.

iterator - The iterator to synchronize access to.

readLock - The lock to use for synchronization on reads.

writeLock - The lock to use for synchronization on writes.

Since 0.3

Constructors

Name Summary
<init> SyncIterator(iterator: Iterator<T>)SyncIterator(iterator: Iterator<T>, readLock: Any, writeLock: Any)
Synchronized Iterator.

Functions

Name Summary
hasNext fun hasNext(): Boolean
next fun next(): T