public final class UnmodifiableList extends AbstractSerializableListDecorator implements Unmodifiable
List to ensure it can't be altered.
This class is Serializable from Commons Collections 3.1.
collection| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
Object object) |
boolean |
add(Object object) |
boolean |
addAll(Collection coll) |
boolean |
addAll(int index,
Collection coll) |
void |
clear() |
static List |
decorate(List list)
Factory method to create an unmodifiable list.
|
Iterator |
iterator() |
ListIterator |
listIterator() |
ListIterator |
listIterator(int index) |
Object |
remove(int index) |
boolean |
remove(Object object) |
boolean |
removeAll(Collection coll) |
boolean |
retainAll(Collection coll) |
Object |
set(int index,
Object object) |
List |
subList(int fromIndex,
int toIndex) |
get, getList, indexOf, lastIndexOfcontains, containsAll, equals, getCollection, hashCode, isEmpty, size, toArray, toArray, toStringpublic static List decorate(List list)
list - the list to decorate, must not be nullIllegalArgumentException - if list is nullpublic Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface Listiterator in class AbstractCollectionDecoratorpublic boolean add(Object object)
add in interface Collectionadd in interface Listadd in class AbstractCollectionDecoratorpublic boolean addAll(Collection coll)
addAll in interface CollectionaddAll in interface ListaddAll in class AbstractCollectionDecoratorpublic void clear()
clear in interface Collectionclear in interface Listclear in class AbstractCollectionDecoratorpublic boolean remove(Object object)
remove in interface Collectionremove in interface Listremove in class AbstractCollectionDecoratorpublic boolean removeAll(Collection coll)
removeAll in interface CollectionremoveAll in interface ListremoveAll in class AbstractCollectionDecoratorpublic boolean retainAll(Collection coll)
retainAll in interface CollectionretainAll in interface ListretainAll in class AbstractCollectionDecoratorpublic ListIterator listIterator()
listIterator in interface ListlistIterator in class AbstractListDecoratorpublic ListIterator listIterator(int index)
listIterator in interface ListlistIterator in class AbstractListDecoratorpublic void add(int index,
Object object)
add in interface Listadd in class AbstractListDecoratorpublic boolean addAll(int index,
Collection coll)
addAll in interface ListaddAll in class AbstractListDecoratorpublic Object remove(int index)
remove in interface Listremove in class AbstractListDecoratorpublic Object set(int index, Object object)
set in interface Listset in class AbstractListDecoratorpublic List subList(int fromIndex, int toIndex)
subList in interface ListsubList in class AbstractListDecoratorCopyright © 2001–2015 The Apache Software Foundation. All rights reserved.