|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.apache.commons.collections.list.AbstractLinkedList
|
+--org.apache.commons.collections.list.NodeCachingLinkedList
A List implementation that stores a cache of internal Node objects
in an effort to reduce wasteful object creation.
A linked list creates one Node for each item of data added. This can result in a lot of object creation and garbage collection. This implementation seeks to avoid that by maintaining a store of cached nodes.
This implementation is suitable for long-lived lists where both add and remove are used. Short-lived lists, or lists which only grow will have worse performance using this class.
Note that this implementation is not synchronized.
| Constructor Summary | |
NodeCachingLinkedList()
Constructor that creates. |
|
NodeCachingLinkedList(java.util.Collection coll)
Constructor that copies the specified collection |
|
NodeCachingLinkedList(int maximumCacheSize)
Constructor that species the maximum cache size. |
|
| Methods inherited from class org.apache.commons.collections.list.AbstractLinkedList |
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, retainAll, set, size, subList, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public NodeCachingLinkedList()
public NodeCachingLinkedList(java.util.Collection coll)
coll - the collection to copypublic NodeCachingLinkedList(int maximumCacheSize)
maximumCacheSize - the maximum cache size
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||