E - The type of elements stored in this list.public class BaseList<E>
extends java.util.AbstractList<E>
implements java.io.Externalizable
| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList<E> |
list |
protected com.mindfusion.diagramming.ListEvent<E> |
listEvent |
protected boolean |
notifyParent |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseList()
Initializes a new instance of the BaseList class.
|
protected |
BaseList(boolean notifyParent)
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 |
|---|---|
void |
add(int index,
E element)
Adds a new element to the list.
|
void |
clear()
Removes all elements from the list.
|
boolean |
contains(java.lang.Object element)
Determines if this list contains the specified element.
|
E |
first()
Gets the first element of this list.
|
E |
get(int index)
Gets the element at the specified position in this list.
|
E |
last()
Gets the last element of this list.
|
protected void |
raiseAdding(E item,
int index)
Raises the adding event.
|
protected void |
raiseClearing()
Raises the clearing event.
|
protected void |
raiseRemoving(E item)
Raises the removing event.
|
void |
readExternal(java.io.ObjectInput in)
Loads the list's contents.
|
E |
remove(int index)
Removes the element at the specified position in this list.
|
boolean |
remove(java.lang.Object element)
Removes the specified element from this list.
|
void |
removeRange(int fromIndex,
int toIndex)
Removes a range of elements from this list.
|
E |
set(int index,
E element)
Sets the element at the specified position in this list.
|
int |
size()
Returns the number of elements in this list.
|
void |
writeExternal(java.io.ObjectOutput out)
Saves the list's contents.
|
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, subListaddAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitprotected java.util.ArrayList<E> list
protected boolean notifyParent
protected com.mindfusion.diagramming.ListEvent<E> listEvent
protected BaseList()
protected BaseList(int capacity)
capacity - The initial capacity of the list.protected BaseList(java.util.Collection<E> c)
c - The collection whose elements to copy.protected BaseList(boolean notifyParent)
notifyParent - true to raise list change events, or false otherwise.public int size()
public E get(int index)
public E first()
public E last()
public void add(int index,
E element)
public E remove(int index)
public boolean remove(java.lang.Object element)
public void removeRange(int fromIndex,
int toIndex)
removeRange in class java.util.AbstractList<E>fromIndex - Index of first element to be removed.toIndex - Index of last element to be removed.public void clear()
public boolean contains(java.lang.Object element)
contains in interface java.util.Collection<E>contains in interface java.util.List<E>contains in class java.util.AbstractCollection<E>element - Element to search the list for.public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - The stream to write the list to.java.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablein - The stream to read the list from.java.io.IOExceptionjava.lang.ClassNotFoundExceptionprotected void raiseAdding(E item, int index)
item - The element that should be added.index - The element's index.protected void raiseRemoving(E item)
item - The element that should be removed.protected void raiseClearing()