java.lang.Object
org.apache.commons.collections.primitives.RandomAccessByteList.ComodChecker
org.apache.commons.collections.primitives.RandomAccessByteList.RandomAccessByteListIterator
- All Implemented Interfaces:
- ByteIterator, ByteListIterator
- Enclosing class:
- RandomAccessByteList
- protected static class RandomAccessByteList.RandomAccessByteListIterator
- extends RandomAccessByteList.ComodChecker
- implements ByteListIterator
|
Method Summary |
void |
add(byte value)
Inserts the specified element into my underlying collection
(optional operation). |
protected void |
assertNotComodified()
|
protected RandomAccessByteList |
getList()
|
boolean |
hasNext()
Returns true iff I have more elements
when traversed in the forward direction. |
boolean |
hasPrevious()
Returns true iff I have more elements
when traversed in the reverse direction. |
byte |
next()
Returns the next element in me when traversed in the
forward direction. |
int |
nextIndex()
Returns the index of the element that would be returned
by a subsequent call to next() 55 , or the number
of elements in my iteration if I have no next element. |
byte |
previous()
Returns the next element in me when traversed in the
reverse direction. |
int |
previousIndex()
Returns the index of the element that would be returned
by a subsequent call to previous() 55 , or
-1 if I have no previous element. |
void |
remove()
Removes from my underlying collection the last
element returned by next() 55 or previous() 55
(optional operation). |
protected void |
resyncModCount()
|
void |
set(byte value)
Replaces in my underlying collection the last
element returned by next() 55 or previous() 55
with the specified value (optional operation). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_nextIndex
private int _nextIndex
_lastReturnedIndex
private int _lastReturnedIndex
RandomAccessByteList.RandomAccessByteListIterator
RandomAccessByteList.RandomAccessByteListIterator(RandomAccessByteList list,
int index)
hasNext
public boolean hasNext()
- Description copied from interface:
ByteListIterator
- Returns
true iff I have more elements
when traversed in the forward direction.
(In other words, returns true iff
a call to ByteListIterator.next() 55 will return an element
rather than throwing an exception.
- Specified by:
hasNext in interface ByteListIterator
hasPrevious
public boolean hasPrevious()
- Description copied from interface:
ByteListIterator
- Returns
true iff I have more elements
when traversed in the reverse direction.
(In other words, returns true iff
a call to ByteListIterator.previous() 55 will return an element
rather than throwing an exception.
- Specified by:
hasPrevious in interface ByteListIterator
nextIndex
public int nextIndex()
- Description copied from interface:
ByteListIterator
- Returns the index of the element that would be returned
by a subsequent call to
ByteListIterator.next() 55 , or the number
of elements in my iteration if I have no next element.
- Specified by:
nextIndex in interface ByteListIterator
previousIndex
public int previousIndex()
- Description copied from interface:
ByteListIterator
- Returns the index of the element that would be returned
by a subsequent call to
ByteListIterator.previous() 55 , or
-1 if I have no previous element.
- Specified by:
previousIndex in interface ByteListIterator
next
public byte next()
- Description copied from interface:
ByteListIterator
- Returns the next element in me when traversed in the
forward direction.
- Specified by:
next in interface ByteListIterator
previous
public byte previous()
- Description copied from interface:
ByteListIterator
- Returns the next element in me when traversed in the
reverse direction.
- Specified by:
previous in interface ByteListIterator
add
public void add(byte value)
- Description copied from interface:
ByteListIterator
- Inserts the specified element into my underlying collection
(optional operation).
The element is inserted immediately before the next element
that would have been returned by
ByteListIterator.next() 55 , if any,
and immediately after the next element that would have been
returned by ByteListIterator.previous() 55 , if any.
The new element is inserted immediately before the implied
cursor. A subsequent call to ByteListIterator.previous() 55 will return
the added element, a subsequent call to ByteListIterator.next() 55 will
be unaffected. This call increases by one the value that
would be returned by a call to ByteListIterator.nextIndex() 55 or
ByteListIterator.previousIndex() 55 .
- Specified by:
add in interface ByteListIterator
remove
public void remove()
- Description copied from interface:
ByteListIterator
- Removes from my underlying collection the last
element returned by
ByteListIterator.next() 55 or ByteListIterator.previous() 55
(optional operation).
- Specified by:
remove in interface ByteListIterator
set
public void set(byte value)
- Description copied from interface:
ByteListIterator
- Replaces in my underlying collection the last
element returned by
ByteListIterator.next() 55 or ByteListIterator.previous() 55
with the specified value (optional operation).
- Specified by:
set in interface ByteListIterator
getList
protected RandomAccessByteList getList()
assertNotComodified
protected void assertNotComodified()
throws java.util.ConcurrentModificationException
resyncModCount
protected void resyncModCount()