|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use Transformer | |
---|---|
org.apache.commons.collections | This package contains the interfaces and utilities shared across all the subpackages of this component. |
org.apache.commons.collections.bag |
This package contains implementations of the
Bag and
SortedBag 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.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.set |
This package contains implementations of the
Set and
SortedSet interfaces. |
Uses of Transformer in org.apache.commons.collections |
---|
Methods in org.apache.commons.collections that return Transformer | ||
---|---|---|
static
|
TransformerUtils.asTransformer(Closure<T> closure)
Creates a Transformer that calls a Closure each time the transformer is used. |
|
static
|
TransformerUtils.asTransformer(Factory<T> factory)
Creates a Transformer that calls a Factory each time the transformer is used. |
|
static
|
TransformerUtils.asTransformer(Predicate<T> predicate)
Creates a Transformer that calls a Predicate each time the transformer is used. |
|
static
|
TransformerUtils.chainedTransformer(Collection transformers)
Create a new Transformer that calls each transformer in turn, passing the result into the next transformer. |
|
static
|
TransformerUtils.chainedTransformer(Transformer[] transformers)
Create a new Transformer that calls each transformer in turn, passing the result into the next transformer. |
|
static
|
TransformerUtils.chainedTransformer(Transformer<I,? extends M> transformer1,
Transformer<? super M,O> transformer2)
Create a new Transformer that calls two transformers, passing the result of the first into the second. |
|
static Transformer |
TransformerUtils.cloneTransformer()
Gets a transformer that returns a clone of the input object. |
|
static
|
TransformerUtils.constantTransformer(T constantToReturn)
Creates a Transformer that will return the same object each time the transformer is used. |
|
static Transformer |
TransformerUtils.exceptionTransformer()
Gets a transformer that always throws an exception. |
|
protected Transformer |
BeanMap.getTypeTransformer(Class aType)
Returns a transformer for the given primitive type. |
|
static Transformer<Class,Object> |
TransformerUtils.instantiateTransformer()
Gets a Transformer that expects an input Class object that it will instantiate. |
|
static Transformer<Class,Object> |
TransformerUtils.instantiateTransformer(Class[] paramTypes,
Object[] args)
Creates a Transformer that expects an input Class object that it will instantiate. |
|
static Transformer |
TransformerUtils.invokerTransformer(String methodName)
Gets a Transformer that invokes a method on the input object. |
|
static Transformer |
TransformerUtils.invokerTransformer(String methodName,
Class[] paramTypes,
Object[] args)
Gets a Transformer that invokes a method on the input object. |
|
static
|
TransformerUtils.mapTransformer(Map<I,O> map)
Creates a Transformer that uses the passed in Map to transform the input object (as a simple lookup). |
|
static Transformer |
TransformerUtils.nopTransformer()
Gets a transformer that returns the input object. |
|
static Transformer |
TransformerUtils.nullTransformer()
Gets a transformer that always returns null. |
|
static
|
TransformerUtils.stringValueTransformer()
Gets a transformer that returns a java.lang.String
representation of the input object. |
|
static
|
TransformerUtils.switchMapTransformer(Map<I,Transformer<? super I,? extends O>> objectsAndTransformers)
Create a new Transformer that uses the input object as a key to find the transformer to call. |
|
static
|
TransformerUtils.switchTransformer(Map<Predicate<? super I>,Transformer<? super I,? extends O>> predicatesAndTransformers)
Create a new Transformer that calls one of the transformers depending on the predicates. |
|
static
|
TransformerUtils.switchTransformer(Predicate<? super I>[] predicates,
Transformer<? super I,? extends O>[] transformers)
Create a new Transformer that calls one of the transformers depending on the predicates. |
|
static
|
TransformerUtils.switchTransformer(Predicate<? super I>[] predicates,
Transformer<? super I,? extends O>[] transformers,
Transformer<? super I,? extends O> defaultTransformer)
Create a new Transformer that calls one of the transformers depending on the predicates. |
|
static
|
TransformerUtils.switchTransformer(Predicate<I> predicate,
Transformer<? super I,? extends O> trueTransformer,
Transformer<? super I,? extends O> falseTransformer)
Create a new Transformer that calls one of two transformers depending on the specified predicate. |
Methods in org.apache.commons.collections with parameters of type Transformer | ||
---|---|---|
static
|
ClosureUtils.asClosure(Transformer<I,O> transformer)
Creates a Closure that calls a Transformer each time it is called. |
|
static
|
PredicateUtils.asPredicate(Transformer<T,Boolean> transformer)
Create a new Predicate that wraps a Transformer. |
|
static
|
TransformerUtils.chainedTransformer(Transformer[] transformers)
Create a new Transformer that calls each transformer in turn, passing the result into the next transformer. |
|
static
|
TransformerUtils.chainedTransformer(Transformer<I,? extends M> transformer1,
Transformer<? super M,O> transformer2)
Create a new Transformer that calls two transformers, passing the result of the first into the second. |
|
static
|
TransformerUtils.chainedTransformer(Transformer<I,? extends M> transformer1,
Transformer<? super M,O> transformer2)
Create a new Transformer that calls two transformers, passing the result of the first into the second. |
|
static
|
CollectionUtils.collect(Collection<I> inputCollection,
Transformer<I,O> transformer)
Returns a new Collection consisting of the elements of inputCollection transformed by the given transformer. |
|
static
|
CollectionUtils.collect(Collection<I> inputCollection,
Transformer<I,O> transformer,
Collection<O> outputCollection)
Transforms all elements from inputCollection with the given transformer and adds them to the outputCollection. |
|
static
|
CollectionUtils.collect(Iterator<I> inputIterator,
Transformer<I,O> transformer)
Transforms all elements from the inputIterator with the given transformer and adds them to the outputCollection. |
|
static
|
CollectionUtils.collect(Iterator<I> inputIterator,
Transformer<I,O> transformer,
Collection<O> outputCollection)
Transforms all elements from the inputIterator with the given transformer and adds them to the outputCollection. |
|
static Iterator |
IteratorUtils.objectGraphIterator(Object root,
Transformer transformer)
Gets an iterator that operates over an object graph. |
|
static
|
TransformerUtils.switchTransformer(Predicate<? super I>[] predicates,
Transformer<? super I,? extends O>[] transformers)
Create a new Transformer that calls one of the transformers depending on the predicates. |
|
static
|
TransformerUtils.switchTransformer(Predicate<? super I>[] predicates,
Transformer<? super I,? extends O>[] transformers,
Transformer<? super I,? extends O> defaultTransformer)
Create a new Transformer that calls one of the transformers depending on the predicates. |
|
static
|
TransformerUtils.switchTransformer(Predicate<? super I>[] predicates,
Transformer<? super I,? extends O>[] transformers,
Transformer<? super I,? extends O> defaultTransformer)
Create a new Transformer that calls one of the transformers depending on the predicates. |
|
static
|
TransformerUtils.switchTransformer(Predicate<I> predicate,
Transformer<? super I,? extends O> trueTransformer,
Transformer<? super I,? extends O> falseTransformer)
Create a new Transformer that calls one of two transformers depending on the specified predicate. |
|
static
|
TransformerUtils.switchTransformer(Predicate<I> predicate,
Transformer<? super I,? extends O> trueTransformer,
Transformer<? super I,? extends O> falseTransformer)
Create a new Transformer that calls one of two transformers depending on the specified predicate. |
|
static
|
CollectionUtils.transform(Collection<E> collection,
Transformer<E,E> transformer)
Transform the collection by applying a Transformer to each element. |
|
static
|
BagUtils.transformedBag(Bag<I> bag,
Transformer<I,O> transformer)
Deprecated. TransformedCollections are not type-safe in Java 1.5. |
|
static
|
BufferUtils.transformedBuffer(Buffer<I> buffer,
Transformer<I,O> transformer)
Returns a transformed buffer backed by the given buffer. |
|
static
|
CollectionUtils.transformedCollection(Collection<I> collection,
Transformer<I,O> transformer)
Returns a transformed bag backed by the given collection. |
|
static
|
ComparatorUtils.transformedComparator(Comparator<I> comparator,
Transformer<I,O> transformer)
Gets a Comparator that passes transformed objects to the given comparator. |
|
static
|
IteratorUtils.transformedIterator(Iterator<I> iterator,
Transformer<I,O> transform)
Gets an iterator that transforms the elements of another iterator. |
|
static
|
ListUtils.transformedList(List<I> list,
Transformer<? super I,? extends O> transformer)
Returns a transformed list backed by the given list. |
|
static Map |
MapUtils.transformedMap(Map map,
Transformer keyTransformer,
Transformer valueTransformer)
Returns a transformed map backed by the given map. |
|
static Map |
MapUtils.transformedMap(Map map,
Transformer keyTransformer,
Transformer valueTransformer)
Returns a transformed map backed by the given map. |
|
static
|
PredicateUtils.transformedPredicate(Transformer<I,? extends O> transformer,
Predicate<? super O> predicate)
Creates a predicate that transforms the input object before passing it to the predicate. |
|
static
|
SetUtils.transformedSet(Set<I> set,
Transformer<? super I,? extends O> transformer)
Returns a transformed set backed by the given set. |
|
static
|
BagUtils.transformedSortedBag(SortedBag<I> bag,
Transformer<I,O> transformer)
Deprecated. This breaks the java.util.Collection interface in Java 1.5. It is recommended that it not be used. |
|
static SortedMap |
MapUtils.transformedSortedMap(SortedMap map,
Transformer keyTransformer,
Transformer valueTransformer)
Returns a transformed sorted map backed by the given map. |
|
static SortedMap |
MapUtils.transformedSortedMap(SortedMap map,
Transformer keyTransformer,
Transformer valueTransformer)
Returns a transformed sorted map backed by the given map. |
|
static
|
SetUtils.transformedSortedSet(SortedSet<I> set,
Transformer<? super I,? extends O> transformer)
Returns a transformed sorted set backed by the given set. |
Method parameters in org.apache.commons.collections with type arguments of type Transformer | ||
---|---|---|
static
|
TransformerUtils.switchMapTransformer(Map<I,Transformer<? super I,? extends O>> objectsAndTransformers)
Create a new Transformer that uses the input object as a key to find the transformer to call. |
|
static
|
TransformerUtils.switchTransformer(Map<Predicate<? super I>,Transformer<? super I,? extends O>> predicatesAndTransformers)
Create a new Transformer that calls one of the transformers depending on the predicates. |
Uses of Transformer in org.apache.commons.collections.bag |
---|
Methods in org.apache.commons.collections.bag with parameters of type Transformer | ||
---|---|---|
static
|
TransformedBag.decorate(Bag<I> bag,
Transformer<? super I,? extends O> transformer)
Factory method to create a transforming bag. |
|
static
|
TransformedSortedBag.decorate(SortedBag<I> bag,
Transformer<? super I,? extends O> transformer)
Factory method to create a transforming sorted bag. |
Constructors in org.apache.commons.collections.bag with parameters of type Transformer | |
---|---|
TransformedBag(Bag bag,
Transformer transformer)
Constructor that wraps (not copies). |
|
TransformedSortedBag(SortedBag bag,
Transformer transformer)
Constructor that wraps (not copies). |
Uses of Transformer in org.apache.commons.collections.buffer |
---|
Methods in org.apache.commons.collections.buffer with parameters of type Transformer | ||
---|---|---|
static
|
TransformedBuffer.decorate(Buffer<I> buffer,
Transformer<? super I,? extends O> transformer)
Factory method to create a transforming buffer. |
Constructors in org.apache.commons.collections.buffer with parameters of type Transformer | |
---|---|
TransformedBuffer(Buffer<I> buffer,
Transformer<? super I,? extends O> transformer)
Constructor that wraps (not copies). |
Uses of Transformer in org.apache.commons.collections.collection |
---|
Fields in org.apache.commons.collections.collection declared as Transformer | |
---|---|
protected Transformer<? super I,? extends O> |
TransformedCollection.transformer
The transformer to use |
Methods in org.apache.commons.collections.collection with parameters of type Transformer | ||
---|---|---|
static
|
TransformedCollection.decorate(Collection<I> coll,
Transformer<? super I,? extends O> transformer)
Factory method to create a transforming collection. |
Constructors in org.apache.commons.collections.collection with parameters of type Transformer | |
---|---|
TransformedCollection(Collection<I> coll,
Transformer<? super I,? extends O> transformer)
Constructor that wraps (not copies). |
Uses of Transformer in org.apache.commons.collections.comparators |
---|
Fields in org.apache.commons.collections.comparators declared as Transformer | |
---|---|
protected Transformer<I,O> |
TransformingComparator.transformer
The transformer being used. |
Constructors in org.apache.commons.collections.comparators with parameters of type Transformer | |
---|---|
TransformingComparator(Transformer<I,O> transformer,
Comparator<O> decorated)
Constructs an instance with the given Transformer and Comparator. |
Uses of Transformer in org.apache.commons.collections.functors |
---|
Classes in org.apache.commons.collections.functors that implement Transformer | |
---|---|
class |
ChainedTransformer<I,O>
Transformer implementation that chains the specified transformers together. |
class |
CloneTransformer
Transformer implementation that returns a clone of the input object. |
class |
ClosureTransformer<T>
Transformer implementation that calls a Closure using the input object and then returns the input. |
class |
ConstantTransformer<T>
Transformer implementation that returns the same constant each time. |
class |
ExceptionTransformer<I,O>
Transformer implementation that always throws an exception. |
class |
FactoryTransformer<T>
Transformer implementation that calls a Factory and returns the result. |
class |
InstantiateTransformer
Transformer implementation that creates a new object instance by reflection. |
class |
InvokerTransformer
Transformer implementation that creates a new object instance by reflection. |
class |
MapTransformer<I,O>
Transformer implementation that returns the value held in a specified map using the input parameter as a key. |
class |
NOPTransformer<I>
Transformer implementation that does nothing. |
class |
PredicateTransformer<T>
Transformer implementation that calls a Predicate using the input object and then returns the input. |
class |
StringValueTransformer<T>
Transformer implementation that returns the String.valueOf . |
class |
SwitchTransformer<I,O>
Transformer implementation calls the transformer whose predicate returns true, like a switch statement. |
Fields in org.apache.commons.collections.functors declared as Transformer | |
---|---|
static Transformer |
NOPTransformer.INSTANCE
Singleton predicate instance |
static Transformer |
ExceptionTransformer.INSTANCE
Singleton predicate instance |
static Transformer |
CloneTransformer.INSTANCE
Singleton predicate instance |
static Transformer |
ConstantTransformer.NULL_INSTANCE
Returns null each time |
Methods in org.apache.commons.collections.functors that return Transformer | ||
---|---|---|
Transformer<? super I,? extends O> |
SwitchTransformer.getDefaultTransformer()
Gets the default transformer. |
|
static Transformer |
NOPTransformer.getInstance()
Factory returning the singleton instance. |
|
static Transformer |
ExceptionTransformer.getInstance()
Factory returning the singleton instance. |
|
static Transformer |
CloneTransformer.getInstance()
Factory returning the singleton instance. |
|
static
|
StringValueTransformer.getInstance()
Factory returning the singleton instance. |
|
static
|
ClosureTransformer.getInstance(Closure<T> closure)
Factory method that performs validation. |
|
static
|
ChainedTransformer.getInstance(Collection<Transformer> transformers)
Create a new Transformer that calls each transformer in turn, passing the result into the next transformer. |
|
static
|
FactoryTransformer.getInstance(Factory<T> factory)
Factory method that performs validation. |
|
static
|
MapTransformer.getInstance(Map<I,O> map)
Factory to create the transformer. |
|
static
|
SwitchTransformer.getInstance(Map<Predicate<? super I>,Transformer<? super I,? extends O>> predicatesAndTransformers)
Create a new Transformer that calls one of the transformers depending on the predicates. |
|
static
|
SwitchTransformer.getInstance(Predicate<? super I>[] predicates,
Transformer<? super I,? extends O>[] transformers,
Transformer<? super I,? extends O> defaultTransformer)
Factory method that performs validation and copies the parameter arrays. |
|
static
|
PredicateTransformer.getInstance(Predicate<T> predicate)
Factory method that performs validation. |
|
static Transformer |
InvokerTransformer.getInstance(String methodName)
Gets an instance of this transformer calling a specific method with no arguments. |
|
static Transformer |
InvokerTransformer.getInstance(String methodName,
Class[] paramTypes,
Object[] args)
Gets an instance of this transformer calling a specific method with specific values. |
|
static
|
ConstantTransformer.getInstance(T constantToReturn)
Transformer method that performs validation. |
|
static
|
ChainedTransformer.getInstance(Transformer[] transformers)
Factory method that performs validation and copies the parameter array. |
|
static
|
ChainedTransformer.getInstance(Transformer<I,? extends M> transformer1,
Transformer<? super M,O> transformer2)
Factory method that performs validation. |
|
Transformer<T,Boolean> |
TransformerPredicate.getTransformer()
Gets the transformer. |
|
Transformer<? super I,O> |
TransformerClosure.getTransformer()
Gets the transformer. |
|
Transformer<I,? extends O> |
TransformedPredicate.getTransformer()
Gets the transformer in use. |
|
Transformer<? super I,? extends O>[] |
SwitchTransformer.getTransformers()
Gets the transformers, do not modify the array. |
|
Transformer[] |
ChainedTransformer.getTransformers()
Gets the transformers, do not modify the array. |
Methods in org.apache.commons.collections.functors with parameters of type Transformer | ||
---|---|---|
static
|
SwitchTransformer.getInstance(Predicate<? super I>[] predicates,
Transformer<? super I,? extends O>[] transformers,
Transformer<? super I,? extends O> defaultTransformer)
Factory method that performs validation and copies the parameter arrays. |
|
static
|
SwitchTransformer.getInstance(Predicate<? super I>[] predicates,
Transformer<? super I,? extends O>[] transformers,
Transformer<? super I,? extends O> defaultTransformer)
Factory method that performs validation and copies the parameter arrays. |
|
static
|
ChainedTransformer.getInstance(Transformer[] transformers)
Factory method that performs validation and copies the parameter array. |
|
static
|
TransformerClosure.getInstance(Transformer<? super I,O> transformer)
Factory method that performs validation. |
|
static
|
ChainedTransformer.getInstance(Transformer<I,? extends M> transformer1,
Transformer<? super M,O> transformer2)
Factory method that performs validation. |
|
static
|
ChainedTransformer.getInstance(Transformer<I,? extends M> transformer1,
Transformer<? super M,O> transformer2)
Factory method that performs validation. |
|
static
|
TransformedPredicate.getInstance(Transformer<I,? extends O> transformer,
Predicate<? super O> predicate)
Factory to create the predicate. |
|
static
|
TransformerPredicate.getInstance(Transformer<T,Boolean> transformer)
Factory to create the predicate. |
Method parameters in org.apache.commons.collections.functors with type arguments of type Transformer | ||
---|---|---|
static
|
ChainedTransformer.getInstance(Collection<Transformer> transformers)
Create a new Transformer that calls each transformer in turn, passing the result into the next transformer. |
|
static
|
SwitchTransformer.getInstance(Map<Predicate<? super I>,Transformer<? super I,? extends O>> predicatesAndTransformers)
Create a new Transformer that calls one of the transformers depending on the predicates. |
Constructors in org.apache.commons.collections.functors with parameters of type Transformer | |
---|---|
ChainedTransformer(Transformer[] transformers)
Constructor that performs no validation. |
|
SwitchTransformer(Predicate<? super I>[] predicates,
Transformer<? super I,? extends O>[] transformers,
Transformer<? super I,? extends O> defaultTransformer)
Constructor that performs no validation. |
|
SwitchTransformer(Predicate<? super I>[] predicates,
Transformer<? super I,? extends O>[] transformers,
Transformer<? super I,? extends O> defaultTransformer)
Constructor that performs no validation. |
|
TransformedPredicate(Transformer<I,? extends O> transformer,
Predicate<? super O> predicate)
Constructor that performs no validation. |
|
TransformerClosure(Transformer<? super I,O> transformer)
Constructor that performs no validation. |
|
TransformerPredicate(Transformer<T,Boolean> transformer)
Constructor that performs no validation. |
Uses of Transformer in org.apache.commons.collections.iterators |
---|
Fields in org.apache.commons.collections.iterators declared as Transformer | |
---|---|
protected Transformer |
ObjectGraphIterator.transformer
The transformer to use |
Methods in org.apache.commons.collections.iterators that return Transformer | |
---|---|
Transformer<I,O> |
TransformIterator.getTransformer()
Gets the transformer this iterator is using. |
Methods in org.apache.commons.collections.iterators with parameters of type Transformer | |
---|---|
void |
TransformIterator.setTransformer(Transformer<I,O> transformer)
Sets the transformer this the iterator to use. |
Constructors in org.apache.commons.collections.iterators with parameters of type Transformer | |
---|---|
ObjectGraphIterator(Object root,
Transformer transformer)
Constructs an ObjectGraphIterator using a root object and transformer. |
|
TransformIterator(Iterator<I> iterator,
Transformer<I,O> transformer)
Constructs a new TransformIterator that will use the
given iterator and transformer. |
Uses of Transformer in org.apache.commons.collections.list |
---|
Methods in org.apache.commons.collections.list with parameters of type Transformer | ||
---|---|---|
static
|
TransformedList.decorate(List<I> list,
Transformer<? super I,? extends O> transformer)
Factory method to create a transforming list. |
Constructors in org.apache.commons.collections.list with parameters of type Transformer | |
---|---|
TransformedList(List<I> list,
Transformer<? super I,? extends O> transformer)
Constructor that wraps (not copies). |
Uses of Transformer in org.apache.commons.collections.map |
---|
Fields in org.apache.commons.collections.map declared as Transformer | |
---|---|
protected Transformer |
TransformedMap.keyTransformer
The transformer to use for the key |
protected Transformer |
TransformedMap.valueTransformer
The transformer to use for the value |
Methods in org.apache.commons.collections.map with parameters of type Transformer | |
---|---|
static Map |
TransformedMap.decorate(Map map,
Transformer keyTransformer,
Transformer valueTransformer)
Factory method to create a transforming map. |
static Map |
TransformedMap.decorate(Map map,
Transformer keyTransformer,
Transformer valueTransformer)
Factory method to create a transforming map. |
static SortedMap |
TransformedSortedMap.decorate(SortedMap map,
Transformer keyTransformer,
Transformer valueTransformer)
Factory method to create a transforming sorted map. |
static SortedMap |
TransformedSortedMap.decorate(SortedMap map,
Transformer keyTransformer,
Transformer valueTransformer)
Factory method to create a transforming sorted map. |
Constructors in org.apache.commons.collections.map with parameters of type Transformer | |
---|---|
TransformedMap(Map map,
Transformer keyTransformer,
Transformer valueTransformer)
Constructor that wraps (not copies). |
|
TransformedMap(Map map,
Transformer keyTransformer,
Transformer valueTransformer)
Constructor that wraps (not copies). |
|
TransformedSortedMap(SortedMap map,
Transformer keyTransformer,
Transformer valueTransformer)
Constructor that wraps (not copies). |
|
TransformedSortedMap(SortedMap map,
Transformer keyTransformer,
Transformer valueTransformer)
Constructor that wraps (not copies). |
Uses of Transformer in org.apache.commons.collections.set |
---|
Methods in org.apache.commons.collections.set with parameters of type Transformer | ||
---|---|---|
static
|
TransformedSet.decorate(Set<I> set,
Transformer<? super I,? extends O> transformer)
Factory method to create a transforming set. |
|
static
|
TransformedSortedSet.decorate(SortedSet<I> set,
Transformer<? super I,? extends O> transformer)
Factory method to create a transforming sorted set. |
Constructors in org.apache.commons.collections.set with parameters of type Transformer | |
---|---|
TransformedSet(Set set,
Transformer transformer)
Constructor that wraps (not copies). |
|
TransformedSortedSet(SortedSet set,
Transformer transformer)
Constructor that wraps (not copies). |
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |