FROM - The type of the element the transformer function applied toTO - The type of the result of transform of <FROM>public abstract static class Lang.Transformer<FROM,TO> extends Lang.F1<FROM,TO>
A Transformer is literally a kind of Lang.F1 function
| Constructor and Description |
|---|
Transformer() |
| Modifier and Type | Method and Description |
|---|---|
static <F,T> Lang.Transformer<F,T> |
adapt(Lang.Function<F,T> func) |
TO |
apply(FROM from)
Apply this function to <T> type parameter.
|
abstract TO |
transform(FROM from)
The place sub class to implement the transform logic
|
andThen, andThen, applyOrElse, compose, compose, compose, compose, compose, compose, curry, invert, lift, orElse, timesbreakOutpublic final TO apply(FROM from)
Lang.FunctionApply this function to <T> type parameter.
In case implementing a partial function, it can throw out an NotAppliedException if the function is not defined for the given parameter(s)
from - the argumentU type resultpublic abstract TO transform(FROM from)
The place sub class to implement the transform logic
from - the element to be transformedpublic static <F,T> Lang.Transformer<F,T> adapt(Lang.Function<F,T> func)
Copyright © 2014–2021 OSGL (Open Source General Library). All rights reserved.