| Package | Description |
|---|---|
| org.osgl | |
| org.osgl.concurrent | |
| org.osgl.storage | |
| org.osgl.util |
| Modifier and Type | Class and Description |
|---|---|
static class |
Lang.Factory<T>
The class adapt traditional Factory to Function
|
static class |
Lang.Producer<PRODUCT>
A Producer is a provider that
Lang.Producer.produce() product |
static class |
Lang.Provider<ELEMENT>
A Provider is a function that apply to nothing and return an element
|
| Modifier and Type | Field and Description |
|---|---|
static Lang.F0 |
Lang.F0
A dumb function for
Lang.Func0 that does nothing and return null |
Lang.F0<T> |
Lang.Option.f.GET
A function that when applied, returns the value described by this
Option |
Lang.F0<Boolean> |
Lang.Option.f.IS_DEFINED
A function that when applied, returns if the
Option is defined |
Lang.F0<Boolean> |
Lang.Option.f.NOT_DEFINED
Negate of
Lang.Option.f.IS_DEFINED |
| Modifier and Type | Method and Description |
|---|---|
Lang.F0<R> |
Lang.F0.andThen(Lang.Func0<? extends R>... fs)
Returns a composed function that applied, in sequence, this function and all functions specified one by one.
|
Lang.F0<R> |
Lang.F1.compose(Lang.Func0<? extends P1> before)
Returns an
F0<R>> function by composing the specified Func0<P1> function with this function applied last |
Lang.F0<R> |
Lang.F1.curry(P1 p1) |
Lang.F0<R> |
Lang.F2.curry(P1 p1,
P2 p2) |
Lang.F0<R> |
Lang.F3.curry(P1 p1,
P2 p2,
P3 p3) |
Lang.F0<R> |
Lang.F4.curry(P1 p1,
P2 p2,
P3 p3,
P4 p4) |
Lang.F0<R> |
Lang.F5.curry(P1 p1,
P2 p2,
P3 p3,
P4 p4,
P5 p5) |
static <T> Lang.F0<T> |
Lang.f0()
Return a dumb function for
Lang.Func0. |
static <R> Lang.F0<R> |
Lang.f0(Lang.Func0<? extends R> f0)
Convert a general
Lang.Func0 typed function to Lang.F0 type |
Lang.F0<Lang.Option<T>> |
Lang.Option.f.filter(Lang.Function<? super T,Boolean> predicate)
Returns a function that when applied, run
Option#filter(Function) on this Option |
<B> Lang.F0<Lang.Option<B>> |
Lang.Option.f.flatMap(Lang.Function<? super T,Lang.Option<B>> mapper)
Returns a function that when applied, run
Option#flatMap(Function) on this Option |
Lang.F0<Lang.Option<R>> |
Lang.F0.lift()
Turns this partial function into a plain function returning an Option result.
|
<B> Lang.F0<Lang.Option<B>> |
Lang.Option.f.map(Lang.Function<? super T,? extends B> mapper)
Returns a function that when applied, run
Option#map(Function) on this Option |
static Lang.F0<Boolean> |
Lang.F.negate(Lang.Func0<Boolean> predicate)
Returns a negate function of the specified predicate function
|
Lang.F0<R> |
Lang.F0.orElse(Lang.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. |
Lang.F0<T> |
Lang.Option.f.orElse(Lang.Func0<? extends T> other)
Returns a function that when applied, run
Option#orElse(Func0) on this Option |
Lang.F0<T> |
Lang.Option.f.orElse(T other)
Returns a function that when applied, run
Lang.Option.orElse(Object) on this Option |
Lang.F0<Void> |
Lang.Option.f.runWith(Lang.Visitor<? super T> consumer)
Returns a function that when applied, run
Option#runWith(Visitor) on this Option |
| Modifier and Type | Method and Description |
|---|---|
R |
Lang.F0.applyOrElse(Lang.F0<? extends R> fallback)
Applies this partial function to the given argument when it is contained in the function domain.
|
static <T> Future<T> |
Lang.async(Lang.F0<T> callback,
int milliseconds)
Execute callback asynchronously after delay specified
|
static <T> T |
Lang.ensureGet(T t1,
Lang.F0<T> def1) |
static <T> T |
Lang.ifNullThen(T t1,
Lang.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 | Method and Description |
|---|---|
static Lang.F0<ISObject> |
IStorageService.f.get(String key,
IStorageService ss) |
static Lang.F0<Void> |
IStorageService.f.put(String key,
ISObject stuff,
IStorageService ss) |
static Lang.F0<Void> |
IStorageService.f.remove(String key,
IStorageService ss) |
| Modifier and Type | Class and Description |
|---|---|
static class |
Img._Load<T extends Img._Load> |
static class |
Img.BinarySourceProcessor<PROCESSOR extends Img.BinarySourceProcessor<PROCESSOR,STAGE>,STAGE extends Img.ProcessorStage<STAGE,PROCESSOR>>
The base class that process two image sources and produce result image
|
static class |
Img.Blur |
static class |
Img.Blur.Stage |
static class |
Img.Concatenater |
static class |
Img.Concatenater.Stage |
static class |
Img.Cropper |
static class |
Img.Cropper.Stage |
static class |
Img.Filter<FILTER extends Img.Filter<FILTER,STAGE>,STAGE extends Img.ProcessorStage<STAGE,FILTER>> |
static class |
Img.Flip |
static class |
Img.Flip.Stage |
static class |
Img.NoiseMaker |
static class |
Img.NoiseMaker.Stage |
static class |
Img.Processor<PROCESSOR extends Img.Processor<PROCESSOR,STAGE>,STAGE extends Img.ProcessorStage<STAGE,PROCESSOR>>
Base class for image operator function which provides source width, height, ratio parameters on demand
|
static class |
Img.ProcessorStage<STAGE extends Img.ProcessorStage<STAGE,PROCESSOR>,PROCESSOR extends Img.Processor<PROCESSOR,STAGE>> |
static class |
Img.Resizer
Resize an image
|
static class |
Img.Resizer.Stage |
static class |
Img.TextWriter |
static class |
Img.TextWriter.Stage |
| Modifier and Type | Field and Description |
|---|---|
static Lang.F0<String> |
S.F.RANDOM |
| Modifier and Type | Method and Description |
|---|---|
Lang.F0<Number> |
N.Op.curry(Number a,
Number b) |
static Lang.F0<String> |
S.F.random() |
static Lang.F0<String> |
S.F.random(int n) |
Copyright © 2014–2019 OSGL (Open Source General Library). All rights reserved.