com.codemesh.terp.api
Class Scalar.Concatenate
java.lang.Object
com.codemesh.terp.api.Transformer.AbstractTransformer<T>
com.codemesh.terp.api.Scalar.AbstractScalarTransformer<java.lang.Object>
com.codemesh.terp.api.Scalar.Concatenate
- All Implemented Interfaces:
- Scalar, Transformer<java.lang.Object>
- Enclosing interface:
- Scalar
public static class Scalar.Concatenate
- extends Scalar.AbstractScalarTransformer<java.lang.Object>
|
Method Summary |
java.lang.Object |
done(java.lang.Object current)
The method that is invoked after the last scalar operation has been performed. |
java.lang.Object |
scalar(java.lang.Object current,
java.lang.Object next,
java.util.List<java.lang.Object> args,
TerpContext ctx)
The method that is invoked after every item transformation to
calculate the updated scalar value of the transformation. |
java.lang.Object |
transform(java.lang.Object item,
java.util.List<java.lang.Object> args,
TerpContext ctx)
Transforms an item into another item, taking optional arguments into account. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TO_STRING
public static final ToString TO_STRING
Scalar.Concatenate
public Scalar.Concatenate()
scalar
public java.lang.Object scalar(java.lang.Object current,
java.lang.Object next,
java.util.List<java.lang.Object> args,
TerpContext ctx)
- Description copied from interface:
Scalar
- The method that is invoked after every item transformation to
calculate the updated scalar value of the transformation.
- Parameters:
current - the current scalar value.next - the next item to be handled.args - optional scalar transformation parameters.ctx - the evaluation context.
This can for example be a string when using a separator transformer that concatenates
all elements in a collection using a configurable separator string as a parameter.
- Returns:
- the next scalar value.
done
public java.lang.Object done(java.lang.Object current)
- Description copied from interface:
Scalar
- The method that is invoked after the last scalar operation has been performed.
this method returns the ultimate result of the scalar transformation.
It can be used to return the ultimate result from a scalar transformer that uses
an intermediate datatype to keep track of incremental state or it can be used to
perform cleanup operations at the end of the transformation.
- Parameters:
current - the current scalar value.
- Returns:
- the ultimate transformation result.
transform
public java.lang.Object transform(java.lang.Object item,
java.util.List<java.lang.Object> args,
TerpContext ctx)
- Description copied from interface:
Transformer
- Transforms an item into another item, taking optional arguments into account.
- Parameters:
item - the item to transform.args - the optional arguments.ctx - the context in which the transformation occurs.
- Returns:
- the transformed item.
Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.