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.
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
java.lang.Object object) |
boolean |
add(java.lang.Object object) |
boolean |
addAll(java.util.Collection coll) |
boolean |
addAll(int index,
java.util.Collection coll) |
void |
clear() |
static java.util.List |
decorate(java.util.List list)
Factory method to create an unmodifiable list.
|
java.util.Iterator |
iterator() |
java.util.ListIterator |
listIterator() |
java.util.ListIterator |
listIterator(int index) |
java.lang.Object |
remove(int index) |
boolean |
remove(java.lang.Object object) |
boolean |
removeAll(java.util.Collection coll) |
boolean |
retainAll(java.util.Collection coll) |
java.lang.Object |
set(int index,
java.lang.Object object) |
java.util.List |
subList(int fromIndex,
int toIndex) |
get, indexOf, lastIndexOf
contains, containsAll, equals, hashCode, isEmpty, size, toArray, toArray, toString
public static java.util.List decorate(java.util.List list)
list
- the list to decorate, must not be nulljava.lang.IllegalArgumentException
- if list is nullpublic java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.List
iterator
in class AbstractCollectionDecorator
public boolean add(java.lang.Object object)
add
in interface java.util.Collection
add
in interface java.util.List
add
in class AbstractCollectionDecorator
public boolean addAll(java.util.Collection coll)
addAll
in interface java.util.Collection
addAll
in interface java.util.List
addAll
in class AbstractCollectionDecorator
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.List
clear
in class AbstractCollectionDecorator
public boolean remove(java.lang.Object object)
remove
in interface java.util.Collection
remove
in interface java.util.List
remove
in class AbstractCollectionDecorator
public boolean removeAll(java.util.Collection coll)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.List
removeAll
in class AbstractCollectionDecorator
public boolean retainAll(java.util.Collection coll)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.List
retainAll
in class AbstractCollectionDecorator
public java.util.ListIterator listIterator()
listIterator
in interface java.util.List
listIterator
in class AbstractListDecorator
public java.util.ListIterator listIterator(int index)
listIterator
in interface java.util.List
listIterator
in class AbstractListDecorator
public void add(int index, java.lang.Object object)
add
in interface java.util.List
add
in class AbstractListDecorator
public boolean addAll(int index, java.util.Collection coll)
addAll
in interface java.util.List
addAll
in class AbstractListDecorator
public java.lang.Object remove(int index)
remove
in interface java.util.List
remove
in class AbstractListDecorator
public java.lang.Object set(int index, java.lang.Object object)
set
in interface java.util.List
set
in class AbstractListDecorator
public java.util.List subList(int fromIndex, int toIndex)
subList
in interface java.util.List
subList
in class AbstractListDecorator
Copyright © 2010 - 2020 Adobe. All Rights Reserved