Top Deprecated
Apache Commons Collections 4.4

Deprecated API


No API in this release is deprecated for removal.

Deprecated Item Summary

SinceDeprecated Item and Description
org.apache.commons.collections4.ArrayStack<
the type of elements in this list
E
>

use java.util.ArrayDeque instead (available from Java 1.6)

Returns:

the number of occurrences of obj in coll
org.apache.commons.collections4.CollectionUtils.cardinality
(final O
the object to find the cardinality of
obj
,
final Iterable<? super O>
the Iterable to search
coll
)

since 4.1, use IterableUtils#frequency(Iterable, Object) instead. Be aware that the order of parameters has changed.

Returns:

the number of matches for the predicate in the collection
org.apache.commons.collections4.CollectionUtils.countMatches
(final Iterable<C>
the Iterable to get the input from, may be null
input
,
final Predicate<? super C>
the predicate to use, may be null
predicate
)

since 4.1, use IterableUtils#countMatches(Iterable, Predicate) instead

Returns:

true if at least one element of the collection matches the predicate
org.apache.commons.collections4.CollectionUtils.exists
(final Iterable<C>
the Iterable to get the input from, may be null
input
,
final Predicate<? super C>
the predicate to use, may be null
predicate
)

since 4.1, use IterableUtils#matchesAny(Iterable, Predicate) instead

Returns:

the first element of the collection which matches the predicate or null if none could be found
org.apache.commons.collections4.CollectionUtils.find
(final Iterable<T>
the collection to search, may be null
collection
,
final Predicate<? super T>
the predicate to use, may be null
predicate
)

since 4.1, use IterableUtils#find(Iterable, Predicate) instead

Returns:

the last element in the collection, or null if either collection or closure is null
org.apache.commons.collections4.CollectionUtils.forAllButLastDo
(final Iterable<T>
the collection to get the input from, may be null
collection
,
final C
the closure to perform, may be null
closure
)

since 4.1, use IterableUtils#forEachButLast(Iterable, Closure) instead

Returns:

the last element in the collection, or null if either iterator or closure is null
org.apache.commons.collections4.CollectionUtils.forAllButLastDo
(final Iterator<T>
the iterator to get the input from, may be null
iterator
,
final C
the closure to perform, may be null
closure
)

since 4.1, use IteratorUtils#forEachButLast(Iterator, Closure) instead

Returns:

closure
org.apache.commons.collections4.CollectionUtils.forAllDo
(final Iterable<T>
the collection to get the input from, may be null
collection
,
final C
the closure to perform, may be null
closure
)

since 4.1, use IterableUtils#forEach(Iterable, Closure) instead

Returns:

closure
org.apache.commons.collections4.CollectionUtils.forAllDo
(final Iterator<T>
the iterator to get the input from, may be null
iterator
,
final C
the closure to perform, may be null
closure
)

since 4.1, use IteratorUtils#forEach(Iterator, Closure) instead

Returns:

the object at the specified index
org.apache.commons.collections4.CollectionUtils.get
(final Iterator<T>
the iterator to get a value from
iterator
,
final int
the index to get
index
)

since 4.1, use IteratorUtils.get(Iterator, int) instead

Returns:

the object at the specified index
org.apache.commons.collections4.CollectionUtils.get
(final Iterable<T>
the Iterable to get a value from
iterable
,
final int
the index to get
index
)

since 4.1, use IterableUtils.get(Iterable, int) instead

Returns:

true if every element of the collection matches the predicate or if the collection is empty, false otherwise
org.apache.commons.collections4.CollectionUtils.matchesAll
(final Iterable<C>
the Iterable to get the input from, may be null
input
,
final Predicate<? super C>
the predicate to use, may be null
predicate
)

since 4.1, use IterableUtils#matchesAll(Iterable, Predicate) instead

Returns:

a synchronized collection backed by the given collection
org.apache.commons.collections4.CollectionUtils.synchronizedCollection
(final Collection<C>
the collection to synchronize, must not be null
collection
)

since 4.1, use java.util.Collections#synchronizedCollection(Collection) instead

Returns:

an unmodifiable collection backed by the given collection
org.apache.commons.collections4.CollectionUtils.unmodifiableCollection
(final Collection<? extends C>
the collection to make unmodifiable, must not be null
collection
)

since 4.1, use java.util.Collections#unmodifiableCollection(Collection) instead

Returns:

a multi-value map backed by the given map which returns ArrayLists of values.
org.apache.commons.collections4.MapUtils.multiValueMap
(final Map<K, ? super Collection<V>>
the map to decorate
map
)

since 4.1, use MultiValuedMap instead

Returns:

a multi-value map backed by the given map which returns collections of the specified type
org.apache.commons.collections4.MapUtils.multiValueMap
(final Map<K, C>
the map to decorate
map
,
final Class<C>
the type of collections to return from the map (must contain public no-arg constructor and extend Collection)
collectionClass
)

since 4.1, use MultiValuedMap instead

Returns:

a multi-value map backed by the given map which returns collections created by the specified collection factory
org.apache.commons.collections4.MapUtils.multiValueMap
(final Map<K, C>
the map to decorate
map
,
final Factory<C>
a factor which creates collection objects
collectionFactory
)

since 4.1, use MultiValuedMap instead

org.apache.commons.collections4.MapUtils.populateMap(final MultiMap<K, V>
the MultiMap to populate.
map
,
final Iterable<? extends V>
the Iterable to use as input values for the map.
elements
,
final Transformer<V, K>
the Transformer used to transform the element into a key value
keyTransformer
)

Deprecated as a consequence of MultiMap being deprecated. See corresponding docs for further information.

org.apache.commons.collections4.MapUtils.populateMap(final MultiMap<K, V>
the MultiMap to populate.
map
,
final Iterable<? extends E>
the Iterable containing the input values for the map.
elements
,
final Transformer<E, K>
the Transformer used to transform the element into a key value
keyTransformer
,
final Transformer<E, V>
the Transformer used to transform the element into a value
valueTransformer
)

Deprecated as a consequence of MultiMap being deprecated. See corresponding docs for further information.

org.apache.commons.collections4.MultiMap<
the type of the keys in this map
K
,
the type of the values in this map
V
>

since 4.1, use MultiValuedMap instead

Returns:

the transformer
org.apache.commons.collections4.TransformerUtils.switchTransformer
(final Predicate<? super I>
the predicate to switch on
predicate
,
final Transformer<? super I, ? extends O>
the transformer called if the predicate is true
trueTransformer
,
final Transformer<? super I, ? extends O>
the transformer called if the predicate is false
falseTransformer
)

as of 4.1, use ifTransformer(Predicate, Transformer, Transformer)

org.apache.commons.collections4.collection.IndexedCollection.IndexedCollection(final Collection<C>
decorated Collection
coll
,
final Transformer<C, K>
Transformer for generating index keys
keyTransformer
,
final MultiMap<K, C>
map to use as index
map
,
final boolean
if the index shall enforce uniqueness of index keys
uniqueIndex
)

Deprecated as a consequence of MultiMap being deprecated. See corresponding docs for further information.

org.apache.commons.collections4.collection.IndexedCollection.index

Deprecated as a consequence of MultiMap being deprecated. See corresponding docs for further information.

org.apache.commons.collections4.map.MultiValueMap<
the type of the keys in this map
K
,
the type of the values in this map
V
>

since 4.1, use MultiValuedMap instead

Returns:

a new multi-value map
org.apache.commons.collections4.map.MultiValueMap.multiValueMap
(final Map<K, ? super Collection<V>>
the map to wrap
map
)

Deprecated as a consequence of MultiValueMap being deprecated. See corresponding docs for further information.

Returns:

a new multi-value map
org.apache.commons.collections4.map.MultiValueMap.multiValueMap
(final Map<K, ? super C>
the map to wrap
map
,
final Class<C>
the type of the collection class
collectionClass
)

Deprecated as a consequence of MultiValueMap being deprecated. See corresponding docs for further information.

Returns:

a new multi-value map
org.apache.commons.collections4.map.MultiValueMap.multiValueMap
(final Map<K, ? super C>
the map to decorate
map
,
final Factory<C>
the collection factory (must return a Collection object).
collectionFactory
)

Deprecated as a consequence of MultiValueMap being deprecated. See corresponding docs for further information.