Package com.sun.corba.ee.impl.ior
Class FreezableList<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- com.sun.corba.ee.impl.ior.FreezableList<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>
,java.util.Collection<E>
,java.util.List<E>
- Direct Known Subclasses:
IdentifiableContainerBase
,IORTemplateListImpl
public class FreezableList<E> extends java.util.AbstractList<E>
Simple class that delegates all List operations to another list. It also can be frozen, which means that a number of operations can be performed on the list, and then the list can be made immutable, so that no further changes are possible. A FreezableList is frozen using the makeImmutable method.
-
-
Constructor Summary
Constructors Constructor Description FreezableList(java.util.List<E> delegate)
FreezableList(java.util.List<E> delegate, boolean immutable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, E element)
boolean
equals(java.lang.Object obj)
E
get(int index)
int
hashCode()
boolean
isImmutable()
void
makeElementsImmutable()
void
makeImmutable()
E
remove(int index)
E
set(int index, E element)
int
size()
java.util.List<E>
subList(int fromIndex, int toIndex)
-
Methods inherited from class java.util.AbstractList
add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
-
-
-
Field Detail
-
delegate
private java.util.List<E> delegate
-
immutable
private boolean immutable
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
-
hashCode
public int hashCode()
-
makeImmutable
public void makeImmutable()
-
isImmutable
public boolean isImmutable()
-
makeElementsImmutable
public void makeElementsImmutable()
-
size
public int size()
-
get
public E get(int index)
-
add
public void add(int index, E element)
-
remove
public E remove(int index)
-
-