|
|||||||||
| Home >> All >> java >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.util
Class AbstractList.RandomAccessSubList

java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.AbstractList.SubList
java.util.AbstractList.RandomAccessSubList
- All Implemented Interfaces:
- Collection, java.lang.Iterable, List, RandomAccess
- Enclosing class:
- AbstractList
- private static final class AbstractList.RandomAccessSubList
- extends AbstractList.SubList
- implements RandomAccess
- extends AbstractList.SubList
This class is a RandomAccess version of SubList, as required by
AbstractList.subList(int, int) 55 .
| Nested Class Summary |
| Nested classes inherited from class java.util.AbstractList |
|
| Field Summary | |
(package private) AbstractList |
backingList
The original list. |
(package private) int |
offset
The index of the first element of the sublist. |
(package private) int |
size
The size of the sublist. |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
(package private) |
AbstractList.RandomAccessSubList(AbstractList backing,
int fromIndex,
int toIndex)
Construct the sublist. |
| Method Summary | |
void |
add(int index,
java.lang.Object o)
Specified by AbstractList.subList to delegate to the backing list. |
boolean |
addAll(Collection c)
Specified by AbstractList.subList to return addAll(size, c). |
boolean |
addAll(int index,
Collection c)
Specified by AbstractList.subList to delegate to the backing list. |
(package private) void |
checkMod()
This method checks the two modCount fields to ensure that there has not been a concurrent modification, returning if all is okay. |
java.lang.Object |
get(int index)
Specified by AbstractList.subList to delegate to the backing list. |
Iterator |
iterator()
Specified by AbstractList.subList to return listIterator(). |
ListIterator |
listIterator(int index)
Specified by AbstractList.subList to return a wrapper around the backing list's iterator. |
java.lang.Object |
remove(int index)
Specified by AbstractList.subList to delegate to the backing list. |
protected void |
removeRange(int fromIndex,
int toIndex)
Specified by AbstractList.subList to delegate to the backing list. |
java.lang.Object |
set(int index,
java.lang.Object o)
Specified by AbstractList.subList to delegate to the backing list. |
int |
size()
Specified by AbstractList.subList to return the private field size. |
| Methods inherited from class java.util.AbstractList |
add, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, removeAllInternal, retainAll, retainAllInternal, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Field Detail |
backingList
final AbstractList backingList
- The original list.
offset
final int offset
- The index of the first element of the sublist.
size
int size
- The size of the sublist.
| Constructor Detail |
AbstractList.RandomAccessSubList
AbstractList.RandomAccessSubList(AbstractList backing, int fromIndex, int toIndex)
- Construct the sublist.
| Method Detail |
checkMod
void checkMod()
- This method checks the two modCount fields to ensure that there has
not been a concurrent modification, returning if all is okay.
size
public int size()
- Specified by AbstractList.subList to return the private field size.
- Specified by:
sizein interfaceList- Specified by:
sizein classAbstractCollection
set
public java.lang.Object set(int index, java.lang.Object o)
- Specified by AbstractList.subList to delegate to the backing list.
- Specified by:
setin interfaceList- Overrides:
setin classAbstractList
get
public java.lang.Object get(int index)
- Specified by AbstractList.subList to delegate to the backing list.
- Specified by:
getin interfaceList- Specified by:
getin classAbstractList
add
public void add(int index,
java.lang.Object o)
- Specified by AbstractList.subList to delegate to the backing list.
- Specified by:
addin interfaceList- Overrides:
addin classAbstractList
remove
public java.lang.Object remove(int index)
- Specified by AbstractList.subList to delegate to the backing list.
- Specified by:
removein interfaceList- Overrides:
removein classAbstractList
removeRange
protected void removeRange(int fromIndex,
int toIndex)
- Specified by AbstractList.subList to delegate to the backing list.
This does no bounds checking, as it assumes it will only be called
by trusted code like clear() which has already checked the bounds.
- Overrides:
removeRangein classAbstractList
addAll
public boolean addAll(int index,
Collection c)
- Specified by AbstractList.subList to delegate to the backing list.
- Specified by:
addAllin interfaceList- Overrides:
addAllin classAbstractList
addAll
public boolean addAll(Collection c)
- Specified by AbstractList.subList to return addAll(size, c).
- Specified by:
addAllin interfaceList- Overrides:
addAllin classAbstractCollection
iterator
public Iterator iterator()
- Specified by AbstractList.subList to return listIterator().
- Specified by:
iteratorin interfaceList- Overrides:
iteratorin classAbstractList
listIterator
public ListIterator listIterator(int index)
- Specified by AbstractList.subList to return a wrapper around the
backing list's iterator.
- Specified by:
listIteratorin interfaceList- Overrides:
listIteratorin classAbstractList
|
|||||||||
| Home >> All >> java >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC