| Package | Description |
|---|---|
| org.osgl | |
| org.osgl.concurrent | |
| org.osgl.util |
| Modifier and Type | Class and Description |
|---|---|
static class |
Osgl.Factory<T>
The class adapt traditional Factory to Function
|
| Modifier and Type | Field and Description |
|---|---|
static Osgl.F0 |
Osgl.F0
A dumb function for
Osgl.Func0 that does nothing and return null |
Osgl.F0<T> |
Osgl.Option.f.GET
A function that when applied, returns the value described by this
Option |
Osgl.F0<Boolean> |
Osgl.Option.f.IS_DEFINED
A function that when applied, returns if the
Option is defined |
Osgl.F0<Boolean> |
Osgl.Option.f.NOT_DEFINED
Negate of
Osgl.Option.f.IS_DEFINED |
| 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.
|
<T> Osgl.F0<T> |
Osgl.F0.andThen(Osgl.Function<? super R,? extends T> after)
Returns a composed function that applies this function to it's input and
then applies the
after function to the result. |
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 |
Osgl.F0<R> |
Osgl.F1.curry(P1 p1) |
Osgl.F0<R> |
Osgl.F2.curry(P1 p1,
P2 p2) |
Osgl.F0<R> |
Osgl.F3.curry(P1 p1,
P2 p2,
P3 p3) |
Osgl.F0<R> |
Osgl.F4.curry(P1 p1,
P2 p2,
P3 p3,
P4 p4) |
Osgl.F0<R> |
Osgl.F5.curry(P1 p1,
P2 p2,
P3 p3,
P4 p4,
P5 p5) |
static <T> Osgl.F0<T> |
Osgl.f0()
Return a dumb function for
Osgl.Func0. |
static <R> Osgl.F0<R> |
Osgl.f0(Osgl.Func0<? extends R> f0)
Convert a general
Osgl.Func0 typed function to Osgl.F0 type |
Osgl.F0<Osgl.Option<T>> |
Osgl.Option.f.filter(Osgl.Function<? super T,Boolean> predicate)
Returns a function that when applied, run
Osgl.Option.filter(Osgl.Function) on this
Option |
<B> Osgl.F0<Osgl.Option<B>> |
Osgl.Option.f.flatMap(Osgl.Function<? super T,Osgl.Option<B>> mapper)
Returns a function that when applied, run
Osgl.Option.flatMap(Osgl.Function) on this
Option |
Osgl.F0<Osgl.Option<R>> |
Osgl.F0.lift()
Turns this partial function into a plain function returning an Option result.
|
<B> Osgl.F0<Osgl.Option<B>> |
Osgl.Option.f.map(Osgl.Function<? super T,? extends B> mapper)
Returns a function that when applied, run
Osgl.Option.map(Osgl.Function) on this
Option |
static Osgl.F0<Boolean> |
Osgl.F.negate(Osgl.Func0<Boolean> predicate)
Returns a negate function of the specified predicate function
|
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. |
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.F0<T> |
Osgl.Option.f.orElse(T other)
Returns a function that when applied, run
Osgl.Option.orElse(Object) on this
Option |
Osgl.F0<Void> |
Osgl.Option.f.runWith(Osgl.Function<? super T,?> consumer)
Returns a function that when applied, run
Osgl.Option.runWith(Osgl.Function)
on this Option |
| Modifier and Type | Method and Description |
|---|---|
R |
Osgl.F0.applyOrElse(Osgl.F0<? extends R> fallback)
Applies this partial function to the given argument when it is contained in the function domain.
|
static <T> Future<T> |
Osgl.async(Osgl.F0<T> callback,
int milliseconds)
Execute callback asynchronously after delay specified
|
static <T> T |
Osgl.ensureGet(T t1,
Osgl.F0<T> def1) |
static <T> T |
Osgl.ifNullThen(T t1,
Osgl.F0<T> def1) |
| Modifier and Type | Class and Description |
|---|---|
static class |
ContextLocal.InitialValueProvider<T> |
class |
ContextLocalBase<T> |
class |
JDKThreadLocal<T>
Implement
ContextLocal using
JDK ThreadLocal |
| Modifier and Type | Field and Description |
|---|---|
static Osgl.F0<String> |
S.F.RANDOM |
| Modifier and Type | Method and Description |
|---|---|
Osgl.F0<Number> |
N.Op.curry(Number a,
Number b) |
static Osgl.F0<String> |
S.F.random() |
static Osgl.F0<String> |
S.F.random(int n) |
Copyright © 2017. All Rights Reserved.