TransformingAtom


class TransformingAtom<I, O> : 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

Converts input to output.

Public constructors

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

Public functions

(Mutable)List<Any!>!
getArguments(elementContext: ElementReference?)

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
TransformingAtom(
    parent: Atom<I!>!,
    transformer: TransformingAtom.Transformer<I!, O!>!
)

Public functions

getArguments

fun getArguments(elementContext: ElementReference?): (Mutable)List<Any!>!

Creates a list of arguments to pass to the script.

Parameters
elementContext: ElementReference?

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

Returns
(Mutable)List<Any!>!

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

getScript

fun getScript(): String!

Provides the script to be evaluated.

transform

fun transform(eval: Evaluation!): O!

Converts an Evaluation into another more suitable type.