T - the type of input parameterU - the type of the return value when this function applied to the parameter(s)public static interface Lang.Function<T,U>
Define a function structure that accept one parameter. This interface is created to make it easily migrate to Java 8 in the future
Lang.Func0,
Lang.Function,
Lang.Func2,
Lang.Func3,
Lang.Func4,
Lang.Func5,
Lang.F1| Modifier and Type | Method and Description |
|---|---|
U |
apply(T t)
Apply this function to <T> type parameter.
|
U apply(T t) throws NotAppliedException, Lang.Break
Apply 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 containerCopyright © 2014–2021 OSGL (Open Source General Library). All rights reserved.