T - the paramete typepublic abstract static class Lang.Processor<T> extends Lang.F1<T,T>
Define a processor function which applied to one parameter and return the parameter instance after processing on the parameter
| Constructor and Description |
|---|
Processor() |
| Modifier and Type | Method and Description |
|---|---|
T |
apply(T t)
Apply this function to <T> type parameter.
|
abstract void |
process(T t)
Subclass must override thie method to process the parameter
|
andThen, andThen, applyOrElse, compose, compose, compose, compose, compose, compose, curry, invert, lift, orElse, timesbreakOutpublic T apply(T t) throws NotAppliedException, Lang.Break
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)
t - the argumentU type resultNotAppliedException - if the function doesn’t apply to the parameter(s)Lang.Break - to short cut collecting operations (fold/reduce) on an containerpublic abstract void process(T t) throws Lang.Break, NotAppliedException
Subclass must override thie method to process the parameter
t - the object to be processedLang.Break - if logic decide it shall break external loopNotAppliedException - if logic decide to skip further processing on the object passed inCopyright © 2014–2021 OSGL (Open Source General Library). All rights reserved.