org.jtransfo.internal
Class LockableList<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<T>
org.jtransfo.internal.LockableList<T>
- Type Parameters:
T - list entry type
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess
public class LockableList<T>
- extends ArrayList<T>
A list which can be locked to prevent further modifications.
- See Also:
- Serialized Form
| Methods inherited from class java.util.ArrayList |
clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, size, toArray, toArray, trimToSize |
LockableList
public LockableList()
lock
public void lock()
- Set read-only status for list. Once this is called, modifications to the list are no longer allowed.
set
public T set(int i,
T t)
- Specified by:
set in interface List<T>- Overrides:
set in class ArrayList<T>
add
public boolean add(T t)
- Specified by:
add in interface Collection<T>- Specified by:
add in interface List<T>- Overrides:
add in class ArrayList<T>
add
public void add(int i,
T t)
- Specified by:
add in interface List<T>- Overrides:
add in class ArrayList<T>
remove
public T remove(int i)
- Specified by:
remove in interface List<T>- Overrides:
remove in class ArrayList<T>
remove
public boolean remove(Object o)
- Specified by:
remove in interface Collection<T>- Specified by:
remove in interface List<T>- Overrides:
remove in class ArrayList<T>
clear
public void clear()
- Specified by:
clear in interface Collection<T>- Specified by:
clear in interface List<T>- Overrides:
clear in class ArrayList<T>
addAll
public boolean addAll(Collection<? extends T> ts)
- Specified by:
addAll in interface Collection<T>- Specified by:
addAll in interface List<T>- Overrides:
addAll in class ArrayList<T>
addAll
public boolean addAll(int i,
Collection<? extends T> ts)
- Specified by:
addAll in interface List<T>- Overrides:
addAll in class ArrayList<T>
Copyright © 2013. All rights reserved.