|
terp - the Codemesh Modular Template Interpreter v1.3.309 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Scalar
The interface that signals that a particular transformer creates a scalar value from a collection. For example, there might be a max transformer that returns the largest item in a collection when invoked in such a way:
{1,2,3,4}[max]
which yields the result 4.
| Nested Class Summary | |
|---|---|
static class |
Scalar.AbstractScalarTransformer<T>
|
static class |
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. |
| Method Detail |
|---|
java.lang.Object scalar(java.lang.Object current,
java.lang.Object next,
java.util.List<java.lang.Object> args,
TerpContext ctx)
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.
java.lang.Object done(java.lang.Object current)
current - the current scalar value.
|
terp - the Codemesh Modular Template Interpreter v1.3.309 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||