terp - the Codemesh Modular
Template Interpreter v1.3.309

com.codemesh.terp.api
Class Scalar.Concatenate

java.lang.Object
  extended by com.codemesh.terp.api.Transformer.AbstractTransformer<T>
      extended by com.codemesh.terp.api.Scalar.AbstractScalarTransformer<java.lang.Object>
          extended by 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>


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.codemesh.terp.api.Scalar
Scalar.AbstractScalarTransformer<T>, Scalar.Concatenate
 
Nested classes/interfaces inherited from interface com.codemesh.terp.api.Transformer
Transformer.AbstractTransformer<T>, Transformer.LineBreaker
 
Field Summary
static ToString TO_STRING
           
 
Fields inherited from interface com.codemesh.terp.api.Transformer
NO_ARGS, NO_PARAM_NAMES
 
Constructor Summary
Scalar.Concatenate()
           
 
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 com.codemesh.terp.api.Transformer.AbstractTransformer
getItemName, getParamNames, transform, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TO_STRING

public static final ToString TO_STRING
Constructor Detail

Scalar.Concatenate

public Scalar.Concatenate()
Method Detail

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.

terp - the Codemesh Modular
Template Interpreter v1.3.309

Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.