bb.util
Class Unmodifiables.UnmodifiableList<E>
java.lang.Object
bb.util.Unmodifiables.UnmodifiableCollection<E>
bb.util.Unmodifiables.UnmodifiableList<E>
- All Implemented Interfaces:
- Serializable, Iterable<E>, Collection<E>, List<E>
- Direct Known Subclasses:
- Unmodifiables.UnmodifiableRandomAccessList
- Enclosing class:
- Unmodifiables
static class Unmodifiables.UnmodifiableList<E>
- extends Unmodifiables.UnmodifiableCollection<E>
- implements List<E>
- See Also:
- Serialized Form
Methods inherited from class bb.util.Unmodifiables.UnmodifiableCollection |
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |
Methods inherited from interface java.util.List |
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
list
final List<? extends E> list
Unmodifiables.UnmodifiableList
Unmodifiables.UnmodifiableList(List<? extends E> list)
equals
public boolean equals(Object o)
- Specified by:
equals
in interface Collection<E>
- Specified by:
equals
in interface List<E>
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Specified by:
hashCode
in interface Collection<E>
- Specified by:
hashCode
in interface List<E>
- Overrides:
hashCode
in class Object
get
public E get(int index)
- Specified by:
get
in interface List<E>
set
public E set(int index,
E element)
- Specified by:
set
in interface List<E>
add
public void add(int index,
E element)
- Specified by:
add
in interface List<E>
remove
public E remove(int index)
- Specified by:
remove
in interface List<E>
indexOf
public int indexOf(Object o)
- Specified by:
indexOf
in interface List<E>
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf
in interface List<E>
addAll
public boolean addAll(int index,
Collection<? extends E> c)
- Specified by:
addAll
in interface List<E>
listIterator
public ListIterator<E> listIterator()
- Specified by:
listIterator
in interface List<E>
listIterator
public ListIterator<E> listIterator(int index)
- Specified by:
listIterator
in interface List<E>
subList
public List<E> subList(int fromIndex,
int toIndex)
- Specified by:
subList
in interface List<E>
readResolve
private Object readResolve()
- UnmodifiableRandomAccessList instances are serialized as
UnmodifiableList instances to allow them to be deserialized
in pre-1.4 JREs (which do not have UnmodifiableRandomAccessList).
This method inverts the transformation. As a beneficial
side-effect, it also grafts the RandomAccess marker onto
UnmodifiableList instances that were serialized in pre-1.4 JREs.
Note: Unfortunately, UnmodifiableRandomAccessList instances
serialized in 1.4.1 and deserialized in 1.4 will become
UnmodifiableList instances, as this method was missing in 1.4.