TransformingAtom

public class TransformingAtom<I, O> implements Atom


Decorates another atom and transforms its output to another type.

Parameters
<I>

the type of the parent Atom.

<O>

the type of the parent atom after applying a transformation.

Summary

Nested types

public interface TransformingAtom.Transformer<I, O>

Converts input to output.

Public constructors

@RemoteMsgConstructor
TransformingAtom(
    Atom<I> parent,
    TransformingAtom.Transformer<I, O> transformer
)

Public methods

List<Object>

Creates a list of arguments to pass to the script.

String

Provides the script to be evaluated.

O

Converts an Evaluation into another more suitable type.

Public constructors

TransformingAtom

@RemoteMsgConstructor
public TransformingAtom(
    Atom<I> parent,
    TransformingAtom.Transformer<I, O> transformer
)

Public methods

getArguments

public List<ObjectgetArguments(@Nullable ElementReference elementContext)

Creates a list of arguments to pass to the script.

Parameters
@Nullable ElementReference elementContext

null unless an ElementReference has been supplied to execute this atom with.

Returns
List<Object>

the List of objects to pass to the script as arguments.

getScript

public String getScript()

Provides the script to be evaluated.

transform

public O transform(Evaluation eval)

Converts an Evaluation into another more suitable type.