# Apache Commons Collections 4.6.0 API

Commons-Collections contains implementations, enhancements and utilities that complement the Java Collections Framework.

The Apache Commons Collections Framework component adds a significant amount of enhancements to the standard JDK collections. These enhancements come in the form of new interfaces, new implementations and utility classes.

See also the `java.util` package for the standard Java collections.

# Main features

Commons-Collections defines a number of key interfaces:

Interfaces
Interface | Description
--- | ---
`Bag` | A new `Collection` subinterface that stores each object together with the number of occurrences. Methods are provided to get the number of occurrences, and to add and remove a certain number of that object.
`BidiMap` | A new `Map` subinterface that allows lookup from key to value and from value to key with equal ease.
`OrderedMap` | A new `Map` subinterface that is used when a map has an order, but is not sorted. Methods enable bidirectional iteration through the map.
`MapIterator` | A new `Iterator` subinterface specially designed for maps. This iterator avoids the need for entrySet iteration of a map, and is simpler to use.
`ResettableIterator` | A new `Iterator` subinterface that allows the iteration to be reset back to the start. Many iterators in this library have this functionality.
`Closure` `Predicate` `Transformer` `Factory` | A group of functor interfaces that provide plugin behavior to various collections and utilities.

In addition to the interfaces, there are many implementations. Consult each subpackage for full details of these.

Packages
Package
Description
org.apache.commons.collections4
Interfaces and utilities shared across all packages.
org.apache.commons.collections4.bag
Implements the `Bag` and `SortedBag` interfaces.
org.apache.commons.collections4.bidimap
Implements the `BidiMap`, `OrderedBidiMap` and `SortedBidiMap` interfaces.
org.apache.commons.collections4.bloomfilter
Implements Bloom filter classes and interfaces.
org.apache.commons.collections4.collection
Implementations of the `Collection` interface.
org.apache.commons.collections4.comparators
Implements the `Comparator` interface.
org.apache.commons.collections4.functors
Implements the `Closure`, `Predicate`, `Transformer` and `Factory` interfaces.
org.apache.commons.collections4.iterators
Implements the `Iterator` interface.
org.apache.commons.collections4.keyvalue
Implements collection and map related key/value classes.
org.apache.commons.collections4.list
Implements the `List` interface.
org.apache.commons.collections4.map
Implements the `Map`, `IterableMap`, `OrderedMap` and `SortedMap` interfaces.
org.apache.commons.collections4.multimap
Implements the `MultiValuedMap` interfaces.
org.apache.commons.collections4.multiset
Implements the `MultiSet` interface.
org.apache.commons.collections4.properties
Extends and customizes the behavior of `Properties`.
org.apache.commons.collections4.queue
Implements the `Queue` interface.
org.apache.commons.collections4.sequence
Compares two sequences of objects.
org.apache.commons.collections4.set
Implements the `Set`, `SortedSet` and `NavigableSet` interfaces.
org.apache.commons.collections4.splitmap
Implements the "split map" concept.
org.apache.commons.collections4.trie
Implements the `Trie` interface.
org.apache.commons.collections4.trie.analyzer
Implements `KeyAnalyzer`.