public static class RestrictedCollections.RestrictedListIterator extends Base implements ListIterator
Base.LoggingWriter, Base.StackFrame
Modifier and Type | Field and Description |
---|---|
protected Class |
m_clz
The class of Objects stored in the ListIterator.
|
protected ListIterator |
m_iter
The underlying ListIterator.
|
Constructor and Description |
---|
RestrictedListIterator(ListIterator iter,
Class clz)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Object o)
Inserts the specified element into the list.
|
protected void |
checkObject(Object o)
Check the passed object to verify that it passes the restriction of
this ListIterator.
|
boolean |
hasNext()
Returns true if this list iterator has more elements when
traversing the list in the forward direction.
|
boolean |
hasPrevious()
Returns true if this list iterator has more elements when
traversing the list in the reverse direction.
|
Object |
next()
Returns the next element in the list.
|
int |
nextIndex()
Returns the index of the element that would be returned by a
subsequent call to next.
|
Object |
previous()
Returns the previous element in the list.
|
int |
previousIndex()
Returns the index of the element that would be returned by a
subsequent call to previous.
|
void |
remove()
Removes from the list the last element that was returned by
next or previous.
|
void |
set(Object o)
Replaces the last element returned by next or
previous with the specified element.
|
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
protected ListIterator m_iter
protected Class m_clz
public RestrictedListIterator(ListIterator iter, Class clz)
iter
- the underlying ListIteratorclz
- the class of objects that may be stored in the
ListIteratorpublic boolean hasNext()
hasNext
in interface Iterator
hasNext
in interface ListIterator
public Object next()
next
in interface Iterator
next
in interface ListIterator
public boolean hasPrevious()
hasPrevious
in interface ListIterator
public Object previous()
previous
in interface ListIterator
NoSuchElementException
- if the iteration has no previous
elementpublic int nextIndex()
nextIndex
in interface ListIterator
public int previousIndex()
previousIndex
in interface ListIterator
public void remove()
remove
in interface Iterator
remove
in interface ListIterator
public void set(Object o)
set
in interface ListIterator
o
- the element with which to replace the last element
returned by next or previousClassCastException
- if the class of the specified element
prevents it from being added to this listpublic void add(Object o)
add
in interface ListIterator
o
- the element to insertClassCastException
- if the class of the specified element
prevents it from being added to this ListIteratorprotected void checkObject(Object o)
o
- the Object to checkClassCastException
- if the class of the passed Object
prevents it from being stored in this
ListIterator