Home » commons-collections-3.2.1-src » org.apache.commons » collections »

org.apache.commons.collections

Sub Packages:

org.apache.commons.collections.bag   This package contains implementations of the Bag and SortedBag interfaces.  
org.apache.commons.collections.bidimap   This package contains implementations of the BidiMap , OrderedBidiMap and SortedBidiMap interfaces.  
org.apache.commons.collections.buffer   This package contains implementations of the Buffer interface.  
org.apache.commons.collections.collection   This package contains implementations of the Collection interface.  
org.apache.commons.collections.comparators   This package contains implementations of the Comparator interface.  
org.apache.commons.collections.functors   This package contains implementations of the Closure , Predicate , Transformer and Factory interfaces.  
org.apache.commons.collections.iterators   This package contains implementations of the Iterator interface.  
org.apache.commons.collections.keyvalue   This package contains implementations of collection and map related key/value classes.  
org.apache.commons.collections.list   This package contains implementations of the List interface.  
org.apache.commons.collections.map   This package contains implementations of the Map , IterableMap , OrderedMap and SortedMap interfaces.  
org.apache.commons.collections.primitives    
org.apache.commons.collections.primitives.adapters   Collections of primitive values.  
org.apache.commons.collections.primitives.adapters.io   Adapters for converting between the primitive and object based versions of the collections framework.  
org.apache.commons.collections.primitives.decorators    
org.apache.commons.collections.set   This package contains implementations of the Set and SortedSet interfaces.  

Interfaces:

Bag   Defines a collection that counts the number of times an object appears in the collection.  code | html
BidiMap   Defines a map that allows bidirectional lookup between key and values.  code | html
BoundedCollection   Defines a collection that is bounded in size.  code | html
BoundedMap   Defines a map that is bounded in size.  code | html
Buffer   Defines a collection that allows objects to be removed in some well-defined order.  code | html
Closure   Defines a functor interface implemented by classes that do something.  code | html
Factory   Defines a functor interface implemented by classes that create objects.  code | html
IterableMap   Defines a map that can be iterated directly without needing to create an entry set.  code | html
KeyValue   Defines a simple key value pair.  code | html
MapIterator   Defines an iterator that operates over a Map code | html
MultiMap   Defines a map that holds a collection of values against each key.  code | html
OrderedBidiMap   Defines a map that allows bidirectional lookup between key and values and retains and provides access to an ordering.  code | html
OrderedIterator   Defines an iterator that operates over an ordered collection.  code | html
OrderedMap   Defines a map that maintains order and allows both forward and backward iteration through that order.  code | html
OrderedMapIterator   Defines an iterator that operates over an ordered Map code | html
Predicate   Defines a functor interface implemented by classes that perform a predicate test on an object.  code | html
PriorityQueue   Defines a collection for priority queues, which can insert, peek and pop.  code | html
ResettableIterator   Defines an iterator that can be reset back to an initial state.  code | html
ResettableListIterator   Defines a list iterator that can be reset back to an initial state.  code | html
SortedBag   Defines a type of Bag that maintains a sorted order among its unique representative members.  code | html
SortedBidiMap   Defines a map that allows bidirectional lookup between key and values and retains both keys and values in sorted order.  code | html
Transformer   Defines a functor interface implemented by classes that transform one object into another.  code | html
Unmodifiable   Marker interface for collections, maps and iterators that are unmodifiable.  code | html

Abstract Classes:

AbstractTestObject   Abstract test class for java.lang.Object methods and contracts.  code | html
DefaultMapBag   A skeletal implementation of the Bag interface to minimize the effort required for target implementations.  code | html
DoubleOrderedMap.DoubleOrderedMapIterator     code | html
FastHashMap.CollectionView   Abstract collection implementation shared by keySet(), values() and entrySet().  code | html
FastTreeMap.CollectionView   Abstract collection implementation shared by keySet(), values() and entrySet().  code | html
ProxyMap  

This Map wraps another Map implementation, using the wrapped instance for its default implementation. 

code | html
TestArrayList     code | html
TestBag   Tests base Bag methods and contracts.  code | html
TestCollection   Tests base java.util.Collection methods and contracts.  code | html
TestLinkedList   Tests base java.util.LinkedList methods and contracts.  code | html
TestList   Tests base java.util.List methods and contracts.  code | html
TestMap   Tests base java.util.Map methods and contracts.  code | html
TestObject   Tests base java.lang.Object methods and contracts.  code | html
TestPredicatedCollection     code | html
TestProxyMap   Tests the org.apache.commons.collections.ProxyMap class.  code | html
TestSet   Tests base Set methods and contracts.

Since Set doesn't stipulate much new behavior that isn't already found in Collection , this class basically just adds tests for Set#equals() and Set#hashCode() along with an updated #verify() that ensures elements do not appear more than once in the set.

To use, subclass and override the #makeEmptySet() method. 

code | html
TestTreeMap     code | html
TestTypedCollection   Tests TypedCollection.  code | html

Classes:

ArrayEnumeration   Enumeration wrapper for array.  code | html
ArrayIterator   Implements an java.util.Iterator over an array of objects.  code | html
ArrayStack   An implementation of the java.util.Stack API that is based on an ArrayList instead of a Vector, so it is not synchronized to protect against multi-threaded access.  code | html
BagUtils   Provides utility methods and decorators for Bag and SortedBag instances.  code | html
BeanMap   An implementation of Map for JavaBeans which uses introspection to get and put properties in the bean.  code | html
BeanMap.MyMapEntry   Map entry used by BeanMap code | html
BinaryHeap   Binary heap implementation of PriorityQueue code | html
BoundedFifoBuffer   The BoundedFifoBuffer is a very efficient implementation of Buffer that does not alter the size of the buffer at runtime.  code | html
BufferOverflowException   The BufferOverflowException is used when the buffer's capacity has been exceeded.  code | html
BufferUnderflowException   The BufferUnderflowException is used when the buffer is already empty.  code | html
BufferUtils   Provides utility methods and decorators for Buffer instances.  code | html
BulkTestSuiteMaker     code | html
ClosureUtils   ClosureUtils provides reference implementations and utilities for the Closure functor interface.  code | html
CollectionUtils   Provides utility methods and decorators for Collection instances.  code | html
ComparatorUtils   Provides convenient static utility methods for Comparator objects.  code | html
CursorableLinkedList   A doubly-linked list implementation of the List interface, supporting a ListIterator that allows concurrent modifications to the underlying list.  code | html
CursorableLinkedList.Cursor     code | html
CursorableLinkedList.ListIter     code | html
CursorableLinkedList.Listable     code | html
CursorableSubList     code | html
DefaultMapBag.BagIterator     code | html
DefaultMapEntry   A default implementation of java.util.Map.Entry   code | html
DoubleOrderedMap   Red-Black tree-based implementation of Map.  code | html
DoubleOrderedMap.Node     code | html
EnumerationIterator   Adapter to make Enumeration instances appear to be Iterator instances.  code | html
EnumerationUtils   Provides utility methods for Enumeration instances.  code | html
ExtendedProperties   This class extends normal Java properties by adding the possibility to use the same key many times concatenating the value strings instead of overwriting them.  code | html
ExtendedProperties.PropertiesReader   This class is used to read properties lines.  code | html
ExtendedProperties.PropertiesTokenizer   This class divides into tokens a property value.  code | html
FactoryUtils   FactoryUtils provides reference implementations and utilities for the Factory functor interface.  code | html
FastArrayList  

A customized implementation of java.util.ArrayList designed to operate in a multithreaded environment where the large majority of method calls are read-only, instead of structural changes. 

code | html
FastArrayList.ListIter     code | html
FastArrayList.SubList     code | html
FastArrayList.SubList.SubListIter     code | html
FastHashMap  

A customized implementation of java.util.HashMap designed to operate in a multithreaded environment where the large majority of method calls are read-only, instead of structural changes. 

code | html
FastHashMap.CollectionView.CollectionViewIterator     code | html
FastHashMap.EntrySet   Set implementation over the entries of the FastHashMap  code | html
FastHashMap.KeySet   Set implementation over the keys of the FastHashMap  code | html
FastHashMap.Values   Collection implementation over the values of the FastHashMap  code | html
FastTreeMap  

A customized implementation of java.util.TreeMap designed to operate in a multithreaded environment where the large majority of method calls are read-only, instead of structural changes. 

code | html
FastTreeMap.CollectionView.CollectionViewIterator     code | html
FastTreeMap.EntrySet   Set implementation over the entries of the FastTreeMap  code | html
FastTreeMap.KeySet   Set implementation over the keys of the FastTreeMap  code | html
FastTreeMap.Values   Collection implementation over the values of the FastTreeMap  code | html
FilterIterator   A Proxy Iterator which takes a Predicate instance to filter out objects from an underlying Iterator instance.  code | html
FilterListIterator   A proxy ListIterator which takes a Predicate instance to filter out objects from an underlying ListIterator instance.  code | html
FunctorException   Runtime exception thrown from functors.  code | html
HashBag   A Bag that is backed by a HashMap code | html
IteratorEnumeration   Adapter to make an Iterator instance appear to be an Enumeration instances  code | html
IteratorUtils   Provides static utility methods and decorators for Iterator instances.  code | html
LRUMap  

An implementation of a Map which has a maximum size and uses a Least Recently Used algorithm to remove items from the Map when the maximum size is reached and new items are added. 

code | html
ListUtils   Provides utility methods and decorators for List instances.  code | html
LocalTestNode   Class LocalTestNode a helper class for TestDoubleOrderedMap  code | html
MapPerformance   TestMapPerformance is designed to perform basic Map performance tests.  code | html
MapPerformance.DummyMap     code | html
MapUtils   Provides utility methods and decorators for Map and SortedMap instances.  code | html
MultiHashMap   MultiHashMap is the default implementation of the MultiMap interface.  code | html
MultiHashMap.ValueIterator   Inner iterator to view the elements.  code | html
MultiHashMap.Values   Inner class to view the elements.  code | html
PredicateUtils   PredicateUtils provides reference implementations and utilities for the Predicate functor interface.  code | html
ProxyIterator   A Proxy Iterator which delegates its methods to a proxy instance.  code | html
ProxyListIterator   A proxy ListIterator which delegates its methods to a proxy instance.  code | html
ReferenceMap   Hash-based Map implementation that allows mappings to be removed by the garbage collector.

When you construct a ReferenceMap, you can specify what kind of references are used to store the map's keys and values. 

code | html
ReferenceMap.Entry     code | html
ReferenceMap.EntryIterator     code | html
ReferenceMap.KeyIterator     code | html
ReferenceMap.SoftRef     code | html
ReferenceMap.ValueIterator     code | html
ReferenceMap.WeakRef     code | html
SequencedHashMap   A map of objects whose mapping entries are sequenced based on the order in which they were added.  code | html
SequencedHashMap.Entry   java.util.Map.Entry that doubles as a node in the linked list of sequenced mappings.  code | html
SequencedHashMap.OrderedIterator     code | html
SetUtils   Provides utility methods and decorators for Set and SortedSet instances.  code | html
SingletonIterator  

SingletonIterator is an Iterator over a single object instance.

 
code | html
SoftRefHashMap  

HashMap with SoftReference links to values which allows the values of the Map to be garbage collected by the JVM if it becomes low on memory. 

code | html
SoftRefHashMap.Entry   A map entry, which is backed by this RefHashMap  code | html
StaticBucketMap   A StaticBucketMap is an efficient, thread-safe implementation of java.util.Map that performs well in in a highly thread-contentious environment.  code | html
StaticBucketMap.EntryIterator     code | html
StaticBucketMap.EntrySet     code | html
StaticBucketMap.KeyIterator     code | html
StaticBucketMap.KeySet     code | html
StaticBucketMap.Lock     code | html
StaticBucketMap.Node   The Map.Entry for the StaticBucketMap.  code | html
StaticBucketMap.ValueIterator     code | html
StaticBucketMap.Values     code | html
StringStack   This class implements a stack for String objects.  code | html
SynchronizedPriorityQueue   A thread safe version of the PriorityQueue.  code | html
TestBeanMap.BeanWithProperties     code | html
TestClosureUtils.MockClosure     code | html
TestClosureUtils.MockTransformer     code | html
TestFactoryUtils.Mock1     code | html
TestFactoryUtils.Mock2     code | html
TestFactoryUtils.Mock3     code | html
TestLRUMap.LRUCounter     code | html
TestMultiHashMap.MapPair     code | html
TransformIterator   A Proxy Iterator which uses a Transformer instance to transform the contents of the Iterator into some other form  code | html
TransformerUtils   TransformerUtils provides reference implementations and utilities for the Transformer functor interface.  code | html
TreeBag   A Bag that is backed by a TreeMap code | html
UnboundedFifoBuffer   UnboundedFifoBuffer is a very efficient buffer implementation.  code | html

All Test Cases:

AbstractTestObject   Abstract test class for java.lang.Object methods and contracts.  code | html
TestArrayList     code | html
TestBag   Tests base Bag methods and contracts.  code | html
TestCollection   Tests base java.util.Collection methods and contracts.  code | html
TestLinkedList   Tests base java.util.LinkedList methods and contracts.  code | html
TestList   Tests base java.util.List methods and contracts.  code | html
TestMap   Tests base java.util.Map methods and contracts.  code | html
TestObject   Tests base java.lang.Object methods and contracts.  code | html
TestPredicatedCollection     code | html
TestProxyMap   Tests the org.apache.commons.collections.ProxyMap class.  code | html
TestSet   Tests base Set methods and contracts.

Since Set doesn't stipulate much new behavior that isn't already found in Collection , this class basically just adds tests for Set#equals() and Set#hashCode() along with an updated #verify() that ensures elements do not appear more than once in the set.

To use, subclass and override the #makeEmptySet() method. 

code | html
TestTreeMap     code | html
TestTypedCollection   Tests TypedCollection.  code | html
BulkTest   A TestCase that can define both simple and bulk test methods.

A simple test method is the type of test traditionally supplied by by TestCase

code | html
TestAll   Entry point for all Collections tests.  code | html
TestAllPackages   Entry point for all Collections project tests.  code | html
TestArrayStack     code | html
TestBagUtils   Tests for BagUtils factory methods.  code | html
TestBeanMap   Test cases for BeanMap  code | html
TestBinaryHeap   Tests the BinaryHeap.  code | html
TestBoundedFifoBuffer   Test cases for BoundedFifoBuffer.  code | html
TestBoundedFifoBuffer2   Runs tests against a full BoundedFifoBuffer, since many of the algorithms differ depending on whether the fifo is full or not.  code | html
TestBufferUtils   Tests for BufferUtils.  code | html
TestClosureUtils   Tests the org.apache.commons.collections.ClosureUtils class.  code | html
TestCollectionUtils     code | html
TestCursorableLinkedList     code | html
TestDoubleOrderedMap   Class TestDoubleOrderedMap Test cases for DoubleOrderedMap.  code | html
TestEnumerationUtils   Tests EnumerationUtils.  code | html
TestExtendedProperties   Tests some basic functions of the ExtendedProperties class  code | html
TestFactoryUtils   Tests the org.apache.commons.collections.FactoryUtils class.  code | html
TestFastArrayList     code | html
TestFastArrayList1   Test FastArrayList implementation in fast mode.  code | html
TestFastHashMap     code | html
TestFastHashMap1   Test FastHashMap in fast mode.  code | html
TestFastTreeMap     code | html
TestFastTreeMap1   Test FastTreeMap in fast mode.  code | html
TestHashBag   Extension of TestBag for exercising the HashBag implementation.  code | html
TestIteratorUtils   Tests for IteratorUtils.  code | html
TestLRUMap     code | html
TestList.BulkTestSubList     code | html
TestListUtils     code | html
TestMap.TestMapEntrySet     code | html
TestMap.TestMapKeySet     code | html
TestMap.TestMapValues     code | html
TestMapUtils   Tests for MapUtils.  code | html
TestMultiHashMap   Unit Tests for MultiHashMap code | html
TestPredicateUtils   Tests the org.apache.commons.collections.PredicateUtils class.  code | html
TestReferenceMap   Tests for ReferenceMap.  code | html
TestSequencedHashMap   Unit tests org.apache.commons.collections.SequencedHashMap code | html
TestSetUtils   Tests for SetUtils.  code | html
TestStaticBucketMap   Unit tests org.apache.commons.collections.StaticBucketMap code | html
TestTransformerUtils   Tests the org.apache.commons.collections.TransformerUtils class.  code | html
TestTreeBag   Extension of TestBag for exercising the TreeBag implementation.  code | html
TestUnboundedFifoBuffer   Test cases for UnboundedFifoBuffer.  code | html