public static class RestrictedCollections.RestrictedList extends RestrictedCollections.RestrictedCollection implements List, Serializable
Base.LoggingWriter, Base.StackFrame
m_clz, m_col
Constructor and Description |
---|
RestrictedList(List list,
Class clz)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
Object element)
Inserts the specified element at the specified position in this list
(optional operation).
|
boolean |
addAll(int index,
Collection col)
Inserts all of the elements in the specified collection into this
list at the specified position (optional operation).
|
Object |
get(int index)
Returns the element at the specified position in this list.
|
int |
indexOf(Object o)
Returns the index in this list of the first occurrence of the
specified element, or -1 if this list does not contain this
element.
|
int |
lastIndexOf(Object o)
Returns the index in this list of the last occurrence of the
specified element, or -1 if this list does not contain this
element.
|
ListIterator |
listIterator()
Returns a list iterator of the elements in this list (in proper
sequence).
|
ListIterator |
listIterator(int index)
Returns a list iterator of the elements in this list (in proper
sequence), starting at the specified position in this list.
|
Object |
remove(int index)
Removes the element at the specified position in this list (optional
operation).
|
Object |
set(int index,
Object element)
Replaces the element at the specified position in this list with the
specified element (optional operation).
|
List |
subList(int fromIndex,
int toIndex)
Returns a view of the portion of this list between the specified
fromIndex, inclusive, and toIndex, exclusive.
|
add, addAll, checkObject, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
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, finalize, getClass, notify, notifyAll, wait, wait, wait
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, replaceAll, retainAll, size, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
public Object get(int index)
public Object set(int index, Object element)
set
in interface List
index
- index of element to replace.element
- element to be stored at the specified position.ClassCastException
- if the class of the specified element
prevents it from being added to this listpublic void add(int index, Object element)
add
in interface List
index
- index at which the specified element is to be
insertedelement
- element to be insertedClassCastException
- if the class of the specified element
prevents it from being added to this listpublic boolean addAll(int index, Collection col)
addAll
in interface List
index
- index at which to insert first element from the
specified collectioncol
- elements to be inserted into this listClassCastException
- if the class of one of elements of the
specified collection prevents it from being added to this
listpublic Object remove(int index)
public int indexOf(Object o)
public int lastIndexOf(Object o)
lastIndexOf
in interface List
o
- element to search forpublic ListIterator listIterator()
listIterator
in interface List
public ListIterator listIterator(int index)
listIterator
in interface List
index
- index of first element to be returned from the
list iterator (by a call to the next method)public List subList(int fromIndex, int toIndex)