Adapts a Java Iterator into an OsidList — bridge lazy sources into the OSID list interface.
The iterator OsidList wraps a Java Iterator<T>
so that any lazily-produced sequence — a database cursor, a stream, a generator — can be
exposed as an OsidList without loading all elements into memory first. Elements are pulled
from the underlying iterator one at a time as the caller invokes getNext().
Because the source is lazy, available() may return
0 even when more elements remain. Callers should rely on hasNext() for
exhaustion checks rather than available() when using this implementation.
| Parameter | Type | Description |
|---|---|---|
iterator |
Iterator<OsidObject> |
the source iterator to drain on iteration |
| Parameter | Type | Description |
|---|---|---|
iterator |
Iterator<OsidObject> |
the source iterator |
Returns OsidObjectList