@Mutable public class ReadOnlyArrayIterator<ELEMENT> extends ReadOnlyIterator<ELEMENT>
| Modifier | Constructor and Description |
|---|---|
protected |
ReadOnlyArrayIterator(ELEMENT... elements) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
boolean |
hasPrevious()
Returns whether this iterator has a previous element.
|
ELEMENT |
next() |
@NonNegative int |
nextIndex()
Returns the index of the next element.
|
ELEMENT |
previous()
Returns the previous element of this iterator.
|
@NonNegative int |
previousIndex()
Returns the index of the previous element.
|
static <ELEMENT> @Nonnull ReadOnlyArrayIterator<ELEMENT> |
with(ELEMENT... elements)
Returns a new read-only array iterator that iterates over the given elements.
|
removeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining@SafeVarargs protected ReadOnlyArrayIterator(@Shared @Unmodified @Nonnull ELEMENT... elements)
@Pure @SafeVarargs @Capturable @Nonnull public static <ELEMENT> @Nonnull ReadOnlyArrayIterator<ELEMENT> with(@Shared @Unmodified @Nonnull ELEMENT... elements)
@Pure public boolean hasNext()
@Impure @NonCapturable public ELEMENT next()
@Pure @NonNegative public @NonNegative int nextIndex()
NoSuchElementException - if there is no next element.@Pure public boolean hasPrevious()
@Impure @NonCapturable public ELEMENT previous()
@Pure @NonNegative public @NonNegative int previousIndex()
NoSuchElementException - if there is no previous element.Copyright © 2017. All rights reserved.