public class RecyclingLinkedList extends SafeLinkedList implements Cloneable, Serializable
| Modifier and Type | Class and Description |
|---|---|
protected class |
RecyclingLinkedList.Node
A Node in the List.
|
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_RECYCLE_MAX
The default maximum number of Nodes to recycle.
|
protected RecyclingLinkedList.Node[] |
m_anodeRecycled
The Nodes to recycle.
|
protected int |
m_cRecycleMax
The maximum number of Nodes to recycle.
|
protected int |
m_cRecycleNodes
The current number of Nodes being recycle.
|
m_cNodes, m_current, m_head, m_iPos, m_tailmodCount| Constructor and Description |
|---|
RecyclingLinkedList()
Construct an empty List.
|
RecyclingLinkedList(Collection collection)
Construct a List containing the elements of the specified Collection.
|
RecyclingLinkedList(Collection collection, int cMaxRecycle)
Construct a List containing the elements of the specified Collection.
|
RecyclingLinkedList(int cMaxRecycle)
Construct an empty List.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Create a deep clone of the list.
|
protected void |
initRecycling(int cMaxRecycle)
Initializing the recycling data structures.
|
protected SafeLinkedList.Node |
instantiateNode(Object o)
Instantiate a Node.
|
protected void |
recycleNode(RecyclingLinkedList.Node node)
Recycle the passed Node.
|
add, add, addAll, addAll, clear, contains, containsAll, get, getFirst, getNode, indexOf, lastIndexOf, main, markPosition, remove, remove, removeFirst, reset, set, size, toArray, toArrayequals, hashCode, iterator, listIterator, listIterator, removeRange, subListisEmpty, removeAll, retainAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitequals, hashCode, isEmpty, iterator, listIterator, listIterator, removeAll, replaceAll, retainAll, sort, spliterator, subListparallelStream, removeIf, streamprotected transient RecyclingLinkedList.Node[] m_anodeRecycled
protected transient int m_cRecycleNodes
protected int m_cRecycleMax
protected static final int DEFAULT_RECYCLE_MAX
public RecyclingLinkedList()
public RecyclingLinkedList(int cMaxRecycle)
cMaxRecycle - the maximum number of Nodes to recycle at any given timepublic RecyclingLinkedList(Collection collection)
collection - the Collection to fill this List frompublic RecyclingLinkedList(Collection collection, int cMaxRecycle)
collection - the Collection to fill this List fromcMaxRecycle - the maximum number of Nodes to recycle at any given timeprotected void initRecycling(int cMaxRecycle)
cMaxRecycle - the maximum number of Nodes to recycle at any given timeprotected SafeLinkedList.Node instantiateNode(Object o)
instantiateNode in class SafeLinkedListo - the value for the Nodeprotected void recycleNode(RecyclingLinkedList.Node node)
node - the Node object to recyclepublic Object clone()
clone in class SafeLinkedList