| Home >> All >> org >> apache >> commons >> collections >> [ collection Javadoc ] |
org.apache.commons.collections.collection: Javadoc index of package org.apache.commons.collections.collection.
Package Samples:
org.apache.commons.collections.collection
Classes:
AbstractTestCollection: Abstract test class for java.util.Collection methods and contracts. You should create a concrete subclass of this class to test any custom java.util.Collection implementation. At minimum, you'll have to implement the makeCollection() 55 method. You might want to override some of the additional public methods as well: Element Population Methods Override these if your collection restricts what kind of elements are allowed (for instance, if null is not permitted): getFullElements() 55 getOtherElements() 55 Supported Operation Methods Override these if your collection doesn't support certain operations: ...
AbstractCollectionDecorator: Decorates another Collection to provide additional behaviour. Each method call made on this Collection is forwarded to the decorated Collection . This class is used as a framework on which to build to extensions such as synchronized and unmodifiable behaviour. The main advantage of decoration is that one decorator can wrap any implementation of Collection , whereas sub-classing requires a new class to be written for each implementation. This implementation does not perform any special processing with iterator() 55 . Instead it simply returns the value from the wrapped collection. This may be undesirable, ...
PredicatedCollection: Decorates another Collection to validate that additions match a specified predicate. This collection exists to provide validation for the decorated collection. It is normally created to decorate an empty collection. If an object cannot be added to the collection, an IllegalArgumentException is thrown. One usage would be to ensure that no null entries are added to the collection. Collection coll = PredicatedCollection.decorate(new ArrayList(), NotNullPredicate.INSTANCE); This class is Serializable from Commons Collections 3.1.
UnmodifiableBoundedCollection: UnmodifiableBoundedCollection decorates another BoundedCollection to ensure it can't be altered. If a BoundedCollection is first wrapped in some other collection decorator, such as synchronized or predicated, the BoundedCollection methods are no longer accessible. The factory on this class will attempt to retrieve the bounded nature by examining the package scope variables. This class is Serializable from Commons Collections 3.1.
TestUnmodifiableCollection: Extension of AbstractTestCollection for exercising the UnmodifiableCollection implementation.
TestSynchronizedCollection: Extension of AbstractTestCollection for exercising the SynchronizedCollection implementation.
TestCompositeCollection: Extension of AbstractTestCollection for exercising the CompositeCollection implementation.
TransformedCollection: Decorates another Collection to transform objects that are added. The add 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.
SynchronizedCollection: Decorates another Collection to synchronize its behaviour for a multi-threaded environment. Iterators must be manually synchronized: synchronized (coll) { Iterator it = coll.iterator(); // do stuff with iterator } This class is Serializable from Commons Collections 3.1.
CompositeCollection: Decorates a collection of other collections to provide a single unified view. Changes made to this collection will actually be made on the decorated collection. Add and remove operations require the use of a pluggable strategy. If no strategy is provided then add and remove are unsupported.
TypedCollection: Decorates a Collection 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.
TestTransformedCollection: Extension of TestCollection for exercising the TransformedCollection implementation.
TestPredicatedCollection: Extension of TestCollection for exercising the PredicatedCollection implementation.
UnmodifiableCollection: Decorates another Collection to ensure it can't be altered. This class is Serializable from Commons Collections 3.1.
AbstractSerializableCollectionDecorator: Serializable subclass of AbstractCollectionDecorator.
TestAll: Entry point for tests.
| Home | Contact Us | Privacy Policy | Terms of Service |