Base class for all implementations of assertions for Iterators.
Note that none of the assertions modify the actual iterator, i.e. they do not consume any elements.
In order to use consuming assertions, use toIterable().
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Iterators |
| Access | Constructor and Description |
|---|---|
| protected | AbstractIteratorAssert(Iterator<? extends ELEMENT>
the actual value to verify actual, Class<?> the "self type" selfType)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| public SELF | Returns: this assertion object.Verifies that the actual |
| public SELF | |
| public SELF | Returns: this assertion object.Verifies that the actual iterator is unmodifiable, i.e., throws an |
| public IterableAssert | Returns: the newIterableAssert.Creates a new |
| iterators | back to summary |
|---|---|
| pack-priv Iterators iterators
| |
| AbstractIteratorAssert | back to summary |
|---|---|
| protected AbstractIteratorAssert(Iterator<? extends ELEMENT> actual, Class<?> selfType) Creates a new | |
| assertIsUnmodifiable | back to summary |
|---|---|
| private void assertIsUnmodifiable() | |
| expectUnsupportedOperationException | back to summary |
|---|---|
| private void expectUnsupportedOperationException(Runnable runnable, String method) | |
| hasNext | back to summary |
|---|---|
| public SELF hasNext() Verifies that the actual
| |
| isExhausted | back to summary |
|---|---|
| public SELF isExhausted() Verifies that the actual
| |
| isUnmodifiable | back to summary |
|---|---|
| public SELF isUnmodifiable() Verifies that the actual iterator is unmodifiable, i.e., throws an Example:
| |
| toIterable | back to summary |
|---|---|
| public IterableAssert Creates a new
| |