public class KFList2<T> extends AbstractKFList<T>
AbstractKFList optimized for heap size.
All internal arrays are resized, and iterators are executed without extra object copy.KFList| Constructor and Description |
|---|
KFList2() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T element) |
boolean |
addAll(java.util.Collection<? extends T> c) |
void |
clear() |
boolean |
contains(java.lang.Object element) |
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
boolean |
remove(java.lang.Object element) |
protected void |
removeAllElementsOwnedBy(ej.kf.Feature feature)
Removed all elements owned by the given
Feature. |
int |
size() |
protected void |
toArray(java.util.ArrayList<T> allList)
Add all the elements of the collection to the given
ArrayList. |
containsAll, removeAll, retainAll, stateChanged, toArray, toArraypublic boolean contains(java.lang.Object element)
public boolean add(T element)
java.lang.IllegalArgumentException - if this method is called by the Kernel and the element is owned by a Feature.public boolean remove(java.lang.Object element)
public java.util.Iterator<T> iterator()
public boolean addAll(java.util.Collection<? extends T> c)
addAll in interface java.util.Collection<T>addAll in class AbstractKFList<T>public void clear()
public boolean isEmpty()
public int size()
protected void toArray(java.util.ArrayList<T> allList)
AbstractKFListArrayList.toArray in class AbstractKFList<T>allList - the list where all elements are added.protected void removeAllElementsOwnedBy(ej.kf.Feature feature)
AbstractKFListFeature.removeAllElementsOwnedBy in class AbstractKFList<T>feature - the owner of the elements to be removed