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, 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, 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, waitclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingprotected 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 IteratorhasNext in interface ListIteratorpublic Object next()
next in interface Iteratornext in interface ListIteratorpublic boolean hasPrevious()
hasPrevious in interface ListIteratorpublic Object previous()
previous in interface ListIteratorNoSuchElementException - if the iteration has no previous elementpublic int nextIndex()
nextIndex in interface ListIteratorpublic int previousIndex()
previousIndex in interface ListIteratorpublic void remove()
remove in interface Iteratorremove in interface ListIteratorpublic void set(Object o)
set in interface ListIteratoro - 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 ListIteratoro - 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