| Home >> All >> org >> apache >> commons >> collections >> [ list Javadoc ] |
org.apache.commons.collections.list: Javadoc index of package org.apache.commons.collections.list.
Package Samples:
org.apache.commons.collections.list
Classes:
CursorableLinkedList: A List implementation with a ListIterator that allows concurrent modifications to the underlying list. This implementation supports all of the optional java.util.List operations. It extends AbstractLinkedList and thus provides the stack/queue/dequeue operations available in java.util.LinkedList . The main feature of this class is the ability to modify the list and the iterator at the same time. Both the listIterator() 55 and cursor() 55 methods provides access to a Cursor instance which extends ListIterator . The cursor allows changes to the list concurrent with changes to the iterator. Note that ...
TreeList: A List implementation that is optimised for fast insertions and removals at any index in the list. This list implementation utilises a tree structure internally to ensure that all insertions and removals are O(log n). This provides much faster performance than both an ArrayList and a LinkedList where elements are inserted and removed repeatedly from anywhere in the list. The following relative performance statistics are indicative of this class: get add insert iterate remove TreeList 3 5 1 2 1 ArrayList 1 1 40 1 40 LinkedList 5800 1 350 2 325 ArrayList is a good general purpose list implementation. ...
LazyList: Decorates another List to create objects in the list on demand. When the get(int) 55 method is called with an index greater than the size of the list, the list will automatically grow in size and return a new object from the specified factory. The gaps will be filled by null. If a get method call encounters a null, it will be replaced with a new object from the factory. Thus this list is unsuitable for storing null objects. For instance: Factory factory = new Factory() { public Object create() { return new Date(); } } List lazy = LazyList.decorate(new ArrayList(), factory); Object obj = lazy.get(3); ...
AbstractTestList: Abstract test class for java.util.List methods and contracts. To use, simply extend this class, and implement the makeEmptyList() 55 method. If your AbstractTestList.BulkTestSubList fails one of these tests by design, you may still use this base set of cases. Simply override the test case (method) your AbstractTestList.BulkTestSubList fails or override one of the protected methods from AbstractTestCollection.
SetUniqueList: Decorates a List to ensure that no duplicates are present much like a Set . The List interface makes certain assumptions/requirements. This implementation breaks these in certain ways, but this is merely the result of rejecting duplicates. Each violation is explained in the method, but it should not affect you. The ListOrderedSet class provides an alternative approach, by wrapping an existing Set and retaining insertion order in the iterator. This class is Serializable from Commons Collections 3.1.
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.
PredicatedList: Decorates another List to validate that all additions match a specified predicate. This list exists to provide validation for the decorated list. It is normally created to decorate an empty list. If an object cannot be added to the list, an IllegalArgumentException is thrown. One usage would be to ensure that no null entries are added to the list. List list = PredicatedList.decorate(new ArrayList(), NotNullPredicate.INSTANCE); This class is Serializable from Commons Collections 3.1.
TransformedList: Decorates another List to transform objects that are added. The add and set methods are affected by this class. Thus objects must be removed or searched for using their transformed form. For example, if the transformation converts Strings to Integers, you must use the Integer form to remove objects. This class is Serializable from Commons Collections 3.1.
TestUnmodifiableList: Extension of AbstractTestList for exercising the UnmodifiableList implementation.
TypedList: Decorates another List to validate that elements added are of a specific type. The validation of additions is performed via an instanceof test against a specified Class . If an object cannot be added to the collection, an IllegalArgumentException is thrown.
AbstractLinkedList: An abstract implementation of a linked list which provides numerous points for subclasses to override. Overridable methods are provided to change the storage node and to change how nodes are added to and removed. Hopefully, all you need for unusual subclasses is here.
FixedSizeList: Decorates another List to fix the size preventing add/remove. The add, remove, clear and retain operations are unsupported. The set method is allowed (as it doesn't change the list size). This class is Serializable from Commons Collections 3.1.
SynchronizedList: Decorates another List to synchronize its behaviour for a multi-threaded environment. Methods are synchronized, then forwarded to the decorated list. This class is Serializable from Commons Collections 3.1.
TestSynchronizedList: Extension of TestList for exercising the SynchronizedList implementation.
TestTransformedList: Extension of TestList for exercising the TransformedList implementation.
TestPredicatedList: Extension of TestList for exercising the PredicatedList implementation.
TestFixedSizeList: Extension of TestList for exercising the FixedSizeList implementation.
TestTypedList: Extension of TestList for exercising the TypedList implementation.
TestAbstractLinkedList: Test case for AbstractLinkedList .
UnmodifiableList: Decorates another List to ensure it can't be altered. This class is Serializable from Commons Collections 3.1.
AbstractListDecorator: Decorates another List to provide additional behaviour. Methods are forwarded directly to the decorated list.
TestNodeCachingLinkedList: Test class for NodeCachingLinkedList, a performance optimised LinkedList.
| Home | Contact Us | Privacy Policy | Terms of Service |