Uses of Interface
org.apache.commons.collections4.Factory
Package
Description
Interfaces and utilities shared across all packages.
Implements the
List
interface.-
Uses of Factory in org.apache.commons.collections4
Modifier and TypeMethodDescriptionstatic <T> Factory<T>
FactoryUtils.constantFactory
(T constantToReturn) Creates a Factory that will return the same object each time the factory is used.static <T> Factory<T>
FactoryUtils.exceptionFactory()
Gets a Factory that always throws an exception.static <T> Factory<T>
FactoryUtils.instantiateFactory
(Class<T> classToInstantiate) Creates a Factory that can create objects of a specific type using a no-args constructor.static <T> Factory<T>
FactoryUtils.instantiateFactory
(Class<T> classToInstantiate, Class<?>[] paramTypes, Object[] args) Creates a Factory that can create objects of a specific type using the arguments specified to this method.static <T> Factory<T>
FactoryUtils.nullFactory()
Gets a Factory that will return null each time the factory is used.static <T> Factory<T>
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 TypeMethodDescriptionstatic <I,
O> Transformer<I, O> TransformerUtils.asTransformer
(Factory<? extends O> factory) Creates a Transformer that calls a Factory each time the transformer is used.static <E> List<E>
Returns a "lazy" list whose elements will be created on demand.static <K,
V> IterableMap<K, V> Returns a "lazy" map whose values will be created on demand.static <K,
V> SortedMap<K, V> MapUtils.lazySortedMap
(SortedMap<K, V> map, Factory<? extends V> factory) Returns a "lazy" sorted map whose values will be created on demand.static <K,
V, C extends Collection<V>>
MultiValueMap<K,V> MapUtils.multiValueMap
(Map<K, C> map, Factory<C> collectionFactory) Deprecated.static <O,
R extends Collection<O>>
List<R>IterableUtils.partition
(Iterable<? extends O> iterable, Factory<R> partitionFactory, Predicate<? super O>... predicates) Partitions all elements from iterable into separate output collections, based on the evaluation of the given predicates. -
Uses of Factory in org.apache.commons.collections4.functors
Modifier and TypeClassDescriptionclass
Factory implementation that returns the same constant each time.final class
Factory implementation that always throws an exception.class
Factory implementation that creates a new object instance by reflection.Modifier and TypeFieldDescriptionstatic final Factory
ExceptionFactory.INSTANCE
Singleton predicate instancestatic final Factory
ConstantFactory.NULL_INSTANCE
Returns null each timeModifier and TypeMethodDescriptionstatic <T> Factory<T>
ConstantFactory.constantFactory
(T constantToReturn) Factory method that performs validation.static <T> Factory<T>
ExceptionFactory.exceptionFactory()
Factory returning the singleton instance.FactoryTransformer.getFactory()
Gets the factory.static <T> Factory<T>
InstantiateFactory.instantiateFactory
(Class<T> classToInstantiate, Class<?>[] paramTypes, Object[] args) Factory method that performs validation.static <T> Factory<T>
PrototypeFactory.prototypeFactory
(T prototype) Factory method that performs validation.Modifier and TypeMethodDescriptionstatic <I,
O> Transformer<I, O> FactoryTransformer.factoryTransformer
(Factory<? extends O> factory) Factory method that performs validation.ModifierConstructorDescriptionFactoryTransformer
(Factory<? extends O> factory) Constructor that performs no validation. -
Uses of Factory in org.apache.commons.collections4.list
Modifier and TypeMethodDescriptionstatic <E> LazyList<E>
Factory method to create a lazily instantiating list. -
Uses of Factory in org.apache.commons.collections4.map
Modifier and TypeMethodDescriptionstatic <K,
V> DefaultedMap<K, V> DefaultedMap.defaultedMap
(Map<K, V> map, Factory<? extends V> factory) Factory method to create a defaulting map.static <K,
V> LazyMap<K, V> Factory method to create a lazily instantiated map.static <K,
V> LazySortedMap<K, V> LazySortedMap.lazySortedMap
(SortedMap<K, V> map, Factory<? extends V> factory) Factory method to create a lazily instantiated sorted map.static <K,
V, C extends Collection<V>>
MultiValueMap<K,V> MultiValueMap.multiValueMap
(Map<K, ? super C> map, Factory<C> collectionFactory) Deprecated.Creates a map which decorates the givenmap
and creates the value collections using the suppliedcollectionFactory
.ModifierConstructorDescriptionprotected
Constructor that wraps (not copies).protected
Constructor that wraps (not copies).protected
MultiValueMap
(Map<K, ? super C> map, Factory<C> collectionFactory) Deprecated.Creates a MultiValueMap which decorates the givenmap
and creates the value collections using the suppliedcollectionFactory
.
MultiValuedMap
instead