| Package | Description |
|---|---|
| org.apache.commons.collections4 |
This package contains the interfaces and utilities shared across all the subpackages of this component.
|
| org.apache.commons.collections4.functors |
This package contains implementations of the
Closure,
Predicate,
Transformer and
Factory interfaces.
|
| org.apache.commons.collections4.list |
This package contains implementations of the
List interface.
|
| org.apache.commons.collections4.map |
| Modifier and Type | Method and Description |
|---|---|
static <T> Factory |
FactoryUtils.constantFactory(T constantToReturn)
Creates a Factory that will return the same object each time the factory is used.
|
static <T> Factory |
FactoryUtils.exceptionFactory()
Gets a Factory that always throws an exception.
|
static <T> Factory |
FactoryUtils.instantiateFactory(Class
Creates a Factory that can create objects of a specific type using a no-args constructor.
|
static <T> Factory |
FactoryUtils.instantiateFactory(Class
Creates a Factory that can create objects of a specific type using the arguments specified to this method.
|
static <T> Factory |
FactoryUtils.nullFactory()
Gets a Factory that will return null each time the factory is used.
|
static <T> Factory |
FactoryUtils.prototypeFactory(T prototype)
Creates a Factory that will return a clone of the same prototype object each time the factory is used.
|
| Modifier and Type | Method and Description |
|---|---|
static <I |
TransformerUtils.asTransformer(Factory
Creates a Transformer that calls a Factory each time the transformer is used.
|
static <E> List |
ListUtils.lazyList(List
Returns a "lazy" list whose elements will be created on demand.
|
static <K |
MapUtils.lazyMap(Map
Returns a "lazy" map whose values will be created on demand.
|
static <K |
MapUtils.lazySortedMap(SortedMap
Returns a "lazy" sorted map whose values will be created on demand.
|
static <K |
MapUtils.multiValueMap(Map
Deprecated.
since 4.1, use
MultiValuedMap instead
|
static <O |
IterableUtils.partition(Iterable
Partitions all elements from iterable into separate output collections, based on the evaluation of the given predicates.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ConstantFactory<T>
Factory implementation that returns the same constant each time.
|
class |
ExceptionFactory<T>
Factory implementation that always throws an exception.
|
class |
InstantiateFactory<T>
Factory implementation that creates a new object instance by reflection.
|
| Modifier and Type | Field and Description |
|---|---|
static Factory |
ExceptionFactory.INSTANCE
Singleton predicate instance
|
static Factory |
ConstantFactory.NULL_INSTANCE
Returns null each time
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Factory |
ConstantFactory.constantFactory(T constantToReturn)
Factory method that performs validation.
|
static <T> Factory |
ExceptionFactory.exceptionFactory()
Factory returning the singleton instance.
|
Factory |
FactoryTransformer.getFactory()
Gets the factory.
|
static <T> Factory |
InstantiateFactory.instantiateFactory(Class
Factory method that performs validation.
|
static <T> Factory |
PrototypeFactory.prototypeFactory(T prototype)
Factory method that performs validation.
|
| Modifier and Type | Method and Description |
|---|---|
static <I |
FactoryTransformer.factoryTransformer(Factory
Factory method that performs validation.
|
| Constructor and Description | |
|---|---|
FactoryTransformer(Factory
Constructor that performs no validation.
|
| Modifier and Type | Method and Description |
|---|---|
static <E> LazyList |
LazyList.lazyList(List
Factory method to create a lazily instantiating list.
|
| Constructor and Description | |
|---|---|
LazyList(List
Constructor that wraps (not copies).
|
| Modifier and Type | Method and Description |
|---|---|
static <K |
DefaultedMap.defaultedMap(Map
Factory method to create a defaulting map.
|
static <K |
LazyMap.lazyMap(Map
Factory method to create a lazily instantiated map.
|
static <K |
LazySortedMap.lazySortedMap(SortedMap
Factory method to create a lazily instantiated sorted map.
|
static <K |
MultiValueMap.multiValueMap(Map
Deprecated.
Creates a map which decorates the given
map and creates the value collections using the supplied
collectionFactory.
|
| Constructor and Description | |
|---|---|
LazyMap(Map
Constructor that wraps (not copies).
|
|
LazySortedMap(SortedMap
Constructor that wraps (not copies).
|
|
MultiValueMap(Map
Deprecated.
Creates a MultiValueMap which decorates the given
map and creates the value collections using the supplied
collectionFactory.
|