Package Name | Comment |
org.apache.commons.collections |
This package contains the interfaces and utilities shared across all the subpackages of this component.
The following collection implementations are provided in the package:
- ArrayStack - a non synchronized Stack that follows the same API as java util Stack
- ExtendedProperties - extends the Properties class to add extra functionality
|
org.apache.commons.collections.bag |
This package contains implementations of the
{@link org.apache.commons.collections.Bag Bag} and
{@link org.apache.commons.collections.SortedBag SortedBag} interfaces.
A bag stores an object and a count of the number of occurences of the object.
The following implementations are provided in the package:
- HashBag - implementation that uses a HashMap to store the data
- TreeBag - implementation that uses a TreeMap to store the data
The following decorators are provided in the package:
- Synchronized - synchronizes method access for multi-threaded environments
- Unmodifiable - ensures the bag cannot be altered
- Predicated - ensures that only elements that are valid according to a predicate can be added
- Typed - ensures that only elements that are of a specific type can be added
- Transformed - transforms each element added to the bag
|
org.apache.commons.collections.bidimap |
This package contains implementations of the
{@link org.apache.commons.collections.BidiMap BidiMap},
{@link org.apache.commons.collections.OrderedBidiMap OrderedBidiMap} and
{@link org.apache.commons.collections.SortedBidiMap SortedBidiMap} interfaces.
A BidiMap is an extension to Map that allows keys and values to be looked up with equal ease.
One example usage is a system communicating to a legacy datasource that must convert codes
from the new format to the old format and vice versa.
The following implementations are provided in the package:
- DualHashBidiMap - uses two HashMaps to implement BidiMap
- DualTreeBidiMap - uses two TreeMaps to implement SortedBidiMap
- TreeBidiMap - red-black tree implementation of OrderedBidiMap
The following decorators are provided in the package:
- Unmodifiable - ensures the map cannot be altered
|
org.apache.commons.collections.buffer |
This package contains implementations of the
{@link org.apache.commons.collections.Buffer Buffer} interface.
The following implementations are provided in the package:
- PriorityBuffer - provides for removal based on a comparator ordering
- BoundedFifoBuffer - implements a buffer with a fixed size that throws exceptions when full
- CircularFifoBuffer - implements a buffer with a fixed size that discards oldest when full
- UnboundedFifoBuffer - implements a buffer that grows in size if necessary
The following decorators are provided in the package:
- Synchronized - synchronizes method access for multi-threaded environments
- Unmodifiable - ensures the collection cannot be altered
- Predicated - ensures that only elements that are valid according to a predicate can be added
- Typed - ensures that only elements that are of a specific type can be added
- Transformed - transforms elements added to the buffer
- Blocking - blocks on get and remove until an element is available
|
org.apache.commons.collections.collection |
This package contains implementations of the
{@link java.util.Collection Collection} interface.
The following implementations are provided in the package:
- CompositeCollection - a collection that combines multiple collections into one
The following decorators are provided in the package:
- Synchronized - synchronizes method access for multi-threaded environments
- Unmodifiable - ensures the collection cannot be altered
- Predicated - ensures that only elements that are valid according to a predicate can be added
- Typed - ensures that only elements that are of a specific type can be added
- Transformed - transforms elements as they are added
|
org.apache.commons.collections.comparators |
This package contains implementations of the
{@link java.util.Comparator Comparator} interface.
You may also consider using
{@link org.apache.commons.collections.ComparatorUtils ComparatorUtils},
which is a single class that uses static methods to construct instances
of the classes in this package.
|
org.apache.commons.collections.functors |
This package contains implementations of the
{@link org.apache.commons.collections.Closure Closure},
{@link org.apache.commons.collections.Predicate Predicate},
{@link org.apache.commons.collections.Transformer Transformer} and
{@link org.apache.commons.collections.Factory Factory} interfaces.
These provide simple callbacks for processing with collections.
|
org.apache.commons.collections.iterators |
This package contains implementations of the
{@link java.util.Iterator Iterator} interface.
You may also consider using
{@link org.apache.commons.collections.IteratorUtils IteratorUtils},
which is a single class that uses static methods to construct instances
of the classes in this package.
|
org.apache.commons.collections.keyvalue |
This package contains implementations of collection and map related key/value classes.
These are usually used in maps, however they can be used as data holders in any collection.
The following key/value designs are included:
- Map Entry - various map entry implementations
- KeyValue - a key and value pair, without map entry semantics
- MultiKey - a holder of multiple keys tied together
|
org.apache.commons.collections.list |
This package contains implementations of the
{@link java.util.List List} interface.
The following implementations are provided in the package:
- TreeList - a list that is optimised for insertions and removals at any index in the list
- CursorableLinkedList - a list that can be modified while the listIterator (cursor) is being used
- NodeCachingLinkedList - a linked list that caches the storage nodes for a performance gain
The following decorators are provided in the package:
- Synchronized - synchronizes method access for multi-threaded environments
- Unmodifiable - ensures the collection cannot be altered
- Predicated - ensures that only elements that are valid according to a predicate can be added
- Typed - ensures that only elements that are of a specific type can be added
- Transformed - transforms each element added
- FixedSize - ensures that the size of the list cannot change
- Lazy - creates objects in the list on demand
- Growth - grows the list instead of erroring when set/add used with index beyond the list size
- SetUnique - a list that avoids duplicate entries like a Set
|
org.apache.commons.collections.map |
This package contains implementations of the
{@link java.util.Map Map},
{@link org.apache.commons.collections.IterableMap IterableMap},
{@link org.apache.commons.collections.OrderedMap OrderedMap} and
{@link java.util.SortedMap SortedMap} interfaces.
A Map provides a lookup from a key to a value.
A number of implementations also support the new MapIterator interface that enables
simple iteration of map keys and values.
The following implementations are provided:
- CaseInsensitiveMap - map that compares keys in a case insensitive way
- CompositeMap - map that combines multiple maps into a single view
- HashedMap - general purpose HashMap replacement supporting MapIterator
- IdentityMap - map that uses == for comparison instead of equals()
- Flat3Map - designed for good performance at size 3 or less
- LinkedMap - a hash map that maintains insertion order, supporting OrderedMapIterator
- MultiKeyMap - map that provides special methods for using more than one key to access the value
- ReferenceMap - allows the garbage collector to collect keys and values using equals() for comparison
- ReferenceIdentityMap - allows the garbage collector to collect keys and values using == for comparison
- SingletonMap - a fully featured map to hold one key-value pair
- StaticBucketMap - internally synchronized and designed for thread-contentious environments
The following decorators are provided:
- Unmodifiable - ensures the collection cannot be altered
- Predicated - ensures that only elements that are valid according to a predicate can be added
- Typed - ensures that only elements that are of a specific type can be added
- Transformed - transforms each element added
- FixedSize - ensures that the size of the map cannot change
- Lazy - creates objects in the map on demand
- ListOrdered - ensures that insertion order is retained
|
org.apache.commons.collections.set |
This package contains implementations of the
{@link java.util.Set Set} and
{@link java.util.SortedSet SortedSet} interfaces.
The implementations are in the form of direct implementations and decorators.
A decorator wraps another implementation of the interface to add some
specific additional functionality.
The following implementations are provided in the package:
- CompositeSet - a set that combines multiple sets into one
The following decorators are provided in the package:
- Synchronized - synchronizes method access for multi-threaded environments
- Unmodifiable - ensures the collection cannot be altered
- Predicated - ensures that only elements that are valid according to a predicate can be added
- Typed - ensures that only elements that are of a specific type can be added
- Transformed - transforms each element added
- ListOrdered - ensures that insertion order is retained
- MapBackedSet - a set formed by decorating a Map
|