| Package | Description |
|---|---|
| org.osgl | |
| org.osgl.concurrent |
| Modifier and Type | Class and Description |
|---|---|
static class |
Osgl.F0<R>
Default implementation for
Osgl.Func0. |
static class |
Osgl.Factory<T>
The class adapt traditional Factory to Function
|
static class |
Osgl.Val<T> |
static class |
Osgl.Var<T> |
| Modifier and Type | Method and Description |
|---|---|
Osgl.F0<R> |
Osgl.F0.andThen(Osgl.Func0<? extends R>... fs)
Returns a composed function that applied, in sequence, this function and
all functions specified one by one.
|
static boolean |
Osgl.bool(Osgl.Func0<?> v)
Do bool evaluation on an
Osgl.Func0 instance. |
Osgl.F0<R> |
Osgl.F1.compose(Osgl.Func0<? extends P1> before)
Returns an
F0<R>> function by composing the specified Func0<P1> function
with this function applied last |
static <R> Osgl.F0<R> |
Osgl.f0(Osgl.Func0<? extends R> f0)
Convert a general
Osgl.Func0 typed function to Osgl.F0 type |
static <T> Osgl.Factory<T> |
Osgl.factory(Osgl.Func0<T> func) |
static Osgl.F0<Boolean> |
Osgl.F.negate(Osgl.Func0<Boolean> predicate)
Returns a negate function of the specified predicate function
|
static boolean |
Osgl.not(Osgl.Func0<?> f)
Returns negative of
Osgl.bool(Osgl.Func0) |
Osgl.F0<R> |
Osgl.F0.orElse(Osgl.Func0<? extends R> fallback)
Returns a composed function that when applied, try to apply this function first, in case
a
RuntimeException is captured apply to the fallback function specified. |
T |
Osgl.Option.orElse(Osgl.Func0<? extends T> other)
Return the value if present, otherwise invoke
other and return
the result of that invocation. |
Osgl.F0<T> |
Osgl.Option.f.orElse(Osgl.Func0<? extends T> other)
Returns a function that when applied, run
Osgl.Option.orElse(Osgl.Func0)
on this Option |
Osgl.Var<T> |
Osgl.Var.update(Osgl.Func0<T> changer) |
| Modifier and Type | Class and Description |
|---|---|
static class |
ContextLocal.InitialValueProvider<T> |
class |
ContextLocalBase<T> |
class |
JDKThreadLocal<T>
Implement
ContextLocal using
JDK ThreadLocal |
Copyright © 2017. All Rights Reserved.