| Package | Description |
|---|---|
| org.osgl | |
| org.osgl.util |
| Modifier and Type | Class and Description |
|---|---|
static class |
Osgl.None<T> |
static class |
Osgl.Some<T> |
| Modifier and Type | Method and Description |
|---|---|
static <T> Osgl.Option<T> |
Osgl.cast(Object o,
Class<T> c)
Cast an object to a type.
|
Osgl.Option<T> |
Osgl.Option.filter(Osgl.Function<? super T,Boolean> predicate)
If a value is present, and the value matches the given predicate,
return an
Option describing the value, otherwise return
Osgl.NONE. |
Osgl.Option<T> |
Osgl.Var.findFirst(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Option<T> |
Osgl.Var.findLast(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Option<T> |
Osgl.Var.findOne(Osgl.Function<? super T,Boolean> predicate) |
<B> Osgl.Option<B> |
Osgl.Option.flatMap(Osgl.Function<? super T,Osgl.Option<B>> mapper)
If a value is present, apply the provided
Option-bearing
mapping function to it, return that result, otherwise return
Osgl.NONE. |
<B> Osgl.Option<B> |
Osgl.Option.map(Osgl.Function<? super T,? extends B> mapper)
If a value is present, apply the provided mapping function to it,
and if the result is non-null, return an
Option describing
the result. |
static <T> Osgl.Option<T> |
Osgl.Option.of(T value)
|
Osgl.Option<T> |
Osgl.Var.reduce(Osgl.Func2<T,T,T> accumulator) |
Osgl.Option<T> |
Osgl.Var.reduceLeft(Osgl.Func2<T,T,T> accumulator) |
Osgl.Option<T> |
Osgl.Var.reduceRight(Osgl.Func2<T,T,T> accumulator) |
static <T> Osgl.Option<Class<T>> |
Osgl.safeClassForName(String className) |
static <T> Osgl.Option<Class<T>> |
Osgl.safeClassForName(String className,
ClassLoader classLoader) |
static <T> Osgl.Option<T> |
Osgl.safeNewInstance(String className) |
static <T> Osgl.Option<T> |
Osgl.some(T a) |
Osgl.Option<T> |
Osgl.Var.toOption() |
| Modifier and Type | Method and Description |
|---|---|
<R> Osgl.F1<T,Osgl.Option<R>> |
Osgl.Predicate.elseThen(Osgl.Function<? super T,R> func) |
Osgl.F0<Osgl.Option<T>> |
Osgl.Option.f.filter(Osgl.Function<? super T,Boolean> predicate)
Returns a function that when applied, run
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
flatMap(Osgl.Function) on this
Option |
<R> Osgl.F1<T,Osgl.Option<R>> |
Osgl.Predicate.ifThen(Osgl.Function<? super T,R> func) |
Osgl.F0<Osgl.Option<R>> |
Osgl.F0.lift()
Turns this partial function into a plain function returning an Option result.
|
Osgl.F1<P1,Osgl.Option<R>> |
Osgl.F1.lift()
Turns this partial function into a plain function returning an Option result.
|
Osgl.F2<P1,P2,Osgl.Option<R>> |
Osgl.F2.lift()
Turns this partial function into a plain function returning an Option result.
|
Osgl.F3<P1,P2,P3,Osgl.Option<R>> |
Osgl.F3.lift()
Turns this partial function into a plain function returning an Option result.
|
Osgl.F4<P1,P2,P3,P4,Osgl.Option<R>> |
Osgl.F4.lift()
Turns this partial function into a plain function returning an Option result.
|
Osgl.F5<P1,P2,P3,P4,P5,Osgl.Option<R>> |
Osgl.F5.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
map(Osgl.Function) on this
Option |
| Modifier and Type | Method and Description |
|---|---|
<B> Osgl.Option<B> |
Osgl.Option.flatMap(Osgl.Function<? super T,Osgl.Option<B>> mapper)
If a value is present, apply the provided
Option-bearing
mapping function to it, return that result, otherwise return
Osgl.NONE. |
<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
flatMap(Osgl.Function) on this
Option |
| Modifier and Type | Method and Description |
|---|---|
Osgl.Option<T> |
C.Sequence.findFirst(Osgl.Function<? super T,Boolean> predicate)
Apply the predicate specified to the element of this sequence
from head to tail.
|
Osgl.Option<T> |
ListBase.findFirst(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Option<T> |
SequenceBase.findFirst(Osgl.Function<? super T,Boolean> predicate)
Delegate to
TraversableBase.findOne(org.osgl.Osgl.Function) |
Osgl.Option<ELEMENT> |
C.Range.findLast(Osgl.Function<? super ELEMENT,Boolean> predicate) |
Osgl.Option<ELEMENT> |
LazyRange.findLast(Osgl.Function<? super ELEMENT,Boolean> predicate) |
Osgl.Option<T> |
C.ReversibleSequence.findLast(Osgl.Function<? super T,Boolean> predicate)
Apply the predicate specified to the element of this sequence
from tail to head.
|
Osgl.Option<T> |
ListBase.findLast(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Option<T> |
C.Traversable.findOne(Osgl.Function<? super T,Boolean> predicate)
Returns an element that matches the predicate specified.
|
Osgl.Option<T> |
ListBase.findOne(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Option<T> |
SetBase.findOne(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Option<T> |
TraversableBase.findOne(Osgl.Function<? super T,Boolean> predicate)
Iterate the traversal to check if any element applied to the predicate
the iteration process stop when the element is found and return
an option describing the element.
|
Osgl.Option<T> |
C.Traversable.reduce(Osgl.Func2<T,T,T> accumulator)
Performs a reduction on the elements in this traversable, using provided accumulating
function.
|
Osgl.Option<T> |
C.Sequence.reduce(Osgl.Func2<T,T,T> accumulator)
Performs a reduction on the elements in this traversable, using provided accumulating
function.
|
Osgl.Option<T> |
ListBase.reduce(Osgl.Func2<T,T,T> accumulator) |
Osgl.Option<T> |
SetBase.reduce(Osgl.Func2<T,T,T> accumulator) |
Osgl.Option<T> |
TraversableBase.reduce(Osgl.Func2<T,T,T> accumulator)
Iterate through the traversal to apply the accumulator to
the result of previous application and the element being iterated.
|
Osgl.Option<T> |
C.Sequence.reduceLeft(Osgl.Func2<T,T,T> accumulator)
Run reduction from head to tail.
|
Osgl.Option<T> |
ListBase.reduceLeft(Osgl.Func2<T,T,T> accumulator) |
Osgl.Option<T> |
SequenceBase.reduceLeft(Osgl.Func2<T,T,T> accumulator)
Delegate to
TraversableBase.reduce(org.osgl.Osgl.Func2) |
Osgl.Option<ELEMENT> |
C.Range.reduceRight(Osgl.Func2<ELEMENT,ELEMENT,ELEMENT> accumulator) |
Osgl.Option<ELEMENT> |
LazyRange.reduceRight(Osgl.Func2<ELEMENT,ELEMENT,ELEMENT> accumulator) |
Osgl.Option<T> |
C.ReversibleSequence.reduceRight(Osgl.Func2<T,T,T> accumulator)
Run reduction from tail to head.
|
Osgl.Option<T> |
ListBase.reduceRight(Osgl.Func2<T,T,T> accumulator) |
Copyright © 2017. All Rights Reserved.