public abstract class BaseList<E>
extends java.util.AbstractList<E>
implements java.io.Externalizable
Modifier | Constructor and Description |
---|---|
protected |
BaseList()
Initializes a new instance of the
BaseList class. |
protected |
BaseList(java.util.Collection<E> c)
Initializes a new instance of the
BaseList class. |
protected |
BaseList(int capacity)
Initializes a new instance of the
BaseList class. |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e)
Adds the specified element to the list.
|
void |
add(int index,
E e)
Inserts the specified element at the specified position within the list.
|
void |
addBaseListListener(BaseListListener<E> listener)
Adds a
BaseListListener to the list. |
void |
clear()
Removes all elements from the list.
|
void |
doAdd(int index,
E e)
Effectively adds the specified element to the list.
|
void |
doClear()
Effectively clears the list.
|
void |
doRemove(int index,
E e)
Effectively removes the specified element from the list.
|
void |
doSet(int index,
E e)
Effectively replaces the specified element from the list.
|
E |
first()
Gets the first element of this list.
|
E |
get(int index)
Returns the element at the specified position in the list.
|
protected java.util.ArrayList<E> |
getList()
Returns the underlying list.
|
E |
last()
Gets the last element of this list.
|
void |
readExternal(java.io.ObjectInput in) |
E |
remove(int index)
Removes the first occurrence of the specified element from this list.
|
boolean |
remove(java.lang.Object o)
Removes the first occurrence of the specified element from this list.
|
void |
removeBaseListListener(BaseListListener<E> listener)
Removes the specified
BaseListListener from the list. |
E |
set(int index,
E e)
Replaces the element at the specified position in this list with the specified element.
|
int |
size()
Returns the number of elements in the list.
|
void |
writeExternal(java.io.ObjectOutput out) |
addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
addAll, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
protected BaseList()
BaseList
class.protected BaseList(int capacity)
BaseList
class.public E first()
public E last()
public E get(int index)
public int size()
public boolean add(E e)
public void add(int index, E e)
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<E>
remove
in interface java.util.List<E>
remove
in class java.util.AbstractCollection<E>
o
- An element which must be removed from the list.public E remove(int index)
public E set(int index, E e)
public void clear()
public void doAdd(int index, E e)
public void doRemove(int index, E e)
public void doSet(int index, E e)
public void doClear()
protected java.util.ArrayList<E> getList()
public void addBaseListListener(BaseListListener<E> listener)
BaseListListener
to the list.listener
- The BaseListListener
to be added.public void removeBaseListListener(BaseListListener<E> listener)
BaseListListener
from the list.listener
- The listener to be removed.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException