Collections.unmodifiableList(java.util.List)@Deprecated
public class UnmodifiableList<E>
extends java.lang.Object
implements java.util.List<E>, java.io.Serializable
This is a read-only wrapper around any java.util.List. Query
operations will "read through" to the specified list. Attempts to modify the
list directly or via its iterator will result in a
java.lang.UnsupportedOperationException.
| Constructor and Description |
|---|
UnmodifiableList(java.util.List<? extends E> list)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E element)
Deprecated.
|
void |
add(int index,
E element)
Deprecated.
|
boolean |
addAll(java.util.Collection<? extends E> collection)
Deprecated.
|
boolean |
addAll(int index,
java.util.Collection<? extends E> collection)
Deprecated.
|
void |
clear()
Deprecated.
|
boolean |
contains(java.lang.Object object)
Deprecated.
|
boolean |
containsAll(java.util.Collection<?> collection)
Deprecated.
|
boolean |
equals(java.lang.Object object)
Deprecated.
|
E |
get(int index)
Deprecated.
|
int |
hashCode()
Deprecated.
|
int |
indexOf(java.lang.Object object)
Deprecated.
|
boolean |
isEmpty()
Deprecated.
|
java.util.Iterator<E> |
iterator()
Deprecated.
|
int |
lastIndexOf(java.lang.Object o)
Deprecated.
|
java.util.ListIterator<E> |
listIterator()
Deprecated.
|
java.util.ListIterator<E> |
listIterator(int index)
Deprecated.
|
E |
remove(int index)
Deprecated.
|
boolean |
remove(java.lang.Object object)
Deprecated.
|
boolean |
removeAll(java.util.Collection<?> collection)
Deprecated.
|
boolean |
retainAll(java.util.Collection<?> collection)
Deprecated.
|
E |
set(int index,
E element)
Deprecated.
|
int |
size()
Deprecated.
|
java.util.List<E> |
subList(int fromIndex,
int toIndex)
Deprecated.
|
java.lang.Object[] |
toArray()
Deprecated.
|
<T> T[] |
toArray(T[] a)
Deprecated.
|
java.lang.String |
toString()
Deprecated.
|
public UnmodifiableList(java.util.List<? extends E> list)
public boolean add(E element)
public void add(int index,
E element)
add in interface java.util.List<E>public boolean addAll(java.util.Collection<? extends E> collection)
public boolean addAll(int index,
java.util.Collection<? extends E> collection)
addAll in interface java.util.List<E>public void clear()
public boolean contains(java.lang.Object object)
public boolean containsAll(java.util.Collection<?> collection)
public boolean equals(java.lang.Object object)
public int hashCode()
public int indexOf(java.lang.Object object)
indexOf in interface java.util.List<E>public boolean isEmpty()
public java.util.Iterator<E> iterator()
public int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.List<E>public java.util.ListIterator<E> listIterator()
listIterator in interface java.util.List<E>public java.util.ListIterator<E> listIterator(int index)
listIterator in interface java.util.List<E>public boolean remove(java.lang.Object object)
public boolean removeAll(java.util.Collection<?> collection)
public boolean retainAll(java.util.Collection<?> collection)
public int size()
public java.util.List<E> subList(int fromIndex, int toIndex)
subList in interface java.util.List<E>public java.lang.Object[] toArray()
public <T> T[] toArray(T[] a)
public java.lang.String toString()
toString in class java.lang.Object