| Package | Description |
|---|---|
| org.osgl | |
| org.osgl.util |
| Modifier and Type | Class and Description |
|---|---|
static class |
Osgl.Operator<T> |
static class |
Osgl.Predicate<T>
Predicate is a predefined Function<Boolean, T> typed
function with a set of utilities dealing with boolean operations. |
static class |
Osgl.Processor<T>
Define a processor function which applied to one parameter and return the parameter instance after
processing on the parameter
|
static class |
Osgl.Transformer<FROM,TO>
A Transformer is literally a kind of
Osgl.F1 function |
static class |
Osgl.V1<P1> |
static class |
Osgl.Visitor<T>
Define a visitor (known as Consumer in java 8) function which applied to one parameter and without return type
|
| Modifier and Type | Field and Description |
|---|---|
static Osgl.F1 |
Osgl.F.AS_STRING
A predefined function that when applied to an object instance, returns
String representation of the instance
|
static Osgl.F1 |
Osgl.F1
A dumb
Osgl.Function implementation that does nothing and return null |
static Osgl.F1 |
Osgl.F.HASH_CODE
A predefined function that calculate hash code of an object
|
static Osgl.F1 |
Osgl.F.IDENTITY
A predefined function that when apply to a parameter it return it directly, so for any Object o
|
| Modifier and Type | Method and Description |
|---|---|
Osgl.F1<P1,R> |
Osgl.F1.andThen(Osgl.Function<? super P1,? extends R>... afters)
Returns a composed function that applied, in sequence, this function and
all functions specified one by one.
|
<T> Osgl.F1<P1,T> |
Osgl.F1.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. |
static <T> Osgl.F1<T,String> |
Osgl.F.asString()
A type-safe version of
Osgl.F.AS_STRING. |
static <T> Osgl.F1<T,String> |
Osgl.F.asString(Class<T> tClass)
Type safe version of
Osgl.F.AS_STRING. |
static <T> Osgl.F1<T,Void> |
Osgl.F.breakIf(Osgl.Function<? super T,Boolean> predicate)
Return a one variable function that throw out a
Osgl.Break when a predicate return
true on an element been tested. |
static <P,T> Osgl.F1<T,Void> |
Osgl.F.breakIf(Osgl.Function<? super T,Boolean> predicate,
P payload)
Return a one variable function that throw out a
Osgl.Break with payload specified when a predicate return
true on an element been tested |
<X1> Osgl.F1<X1,R> |
Osgl.F1.compose(Osgl.Function<? super X1,? extends P1> before)
Returns an
F1<X1, R>> function by composing the specified
Function<X1, P1> function with this function applied last |
Osgl.F1<P1,R> |
Osgl.F2.curry(P2 p2) |
Osgl.F1<P1,R> |
Osgl.F3.curry(P2 p2,
P3 p3) |
Osgl.F1<P1,R> |
Osgl.F4.curry(P2 p2,
P3 p3,
P4 p4) |
Osgl.F1<P1,R> |
Osgl.F5.curry(P2 p2,
P3 p3,
P4 p4,
P5 p5) |
<R> Osgl.F1<T,Osgl.Option<R>> |
Osgl.Predicate.elseThen(Osgl.Function<? super T,R> func) |
static <P1,R> Osgl.F1<P1,R> |
Osgl.f1()
The type-safe version of
Osgl.F1 |
static <X,Y> Osgl.F1<X,Y> |
Osgl.f1(Osgl.Bijection<X,Y> f1) |
static <P1,R> Osgl.F1<P1,R> |
Osgl.f1(Osgl.Function<? super P1,? extends R> f1)
Convert a general
Osgl.Function function into a Osgl.F1 typed
function |
static <T extends Comparable<T>> |
Osgl.F.greaterThan(T v)
Alias of
Osgl.F.gt(Comparable) |
static <T extends Comparable<T>> |
Osgl.F.greaterThanOrEqualsTo(T v)
Alias of
Osgl.F.gte(Comparable) |
static <T extends Comparable<T>> |
Osgl.F.gt(T v)
Returns a function that apply to one parameter and compare it with the value
v specified,
returns true if the parameter applied is greater than v |
static <T extends Comparable<T>> |
Osgl.F.gte(T v)
Returns a function that apply to one parameter and compare it with the value
v specified,
returns true if the parameter applied is greater than or equals to v |
static <T> Osgl.F1<T,Integer> |
Osgl.F.hc()
The type-safe version of
Osgl.F.HASH_CODE |
static <T> Osgl.F1<T,T> |
Osgl.F.identity()
The type-safe version of
Osgl.F.IDENTITY |
static <T> Osgl.F1<T,T> |
Osgl.F.identity(Class<T> clz)
The type-safe version of
Osgl.F.IDENTITY |
<R> Osgl.F1<T,Osgl.Option<R>> |
Osgl.Predicate.ifThen(Osgl.Function<? super T,R> func) |
static <T extends Comparable<T>> |
Osgl.F.lessThan(T v)
Alias of
Osgl.F.lt(Comparable) |
static <T extends Comparable<T>> |
Osgl.F.lessThanOrEqualsTo(T v)
Alias of
Osgl.F.lte(Comparable) |
Osgl.F1<P1,Osgl.Option<R>> |
Osgl.F1.lift()
Turns this partial function into a plain function returning an Option result.
|
static <T extends Comparable<T>> |
Osgl.F.lt(T v)
Returns a function that apply to one parameter and compare it with the value
v specified,
returns true if the parameter applied is less than v |
static <T extends Comparable<T>> |
Osgl.F.lte(T v)
Returns a function that apply to one parameter and compare it with the value
v specified,
returns true if the parameter applied is less than or equals to v |
<R> Osgl.F1<R,Osgl.Var<T>> |
Osgl.Var._f.mapper(Osgl.Function<R,T> mapper) |
static <T> Osgl.F1<T,Boolean> |
Osgl.F.not()
Returns a function that evaluate an argument's boolean value and negate the value
|
Osgl.F1<P1,R> |
Osgl.F1.orElse(Osgl.Function<? super P1,? extends R> fallback)
Returns a composed function that when applied, try to apply this function first, in case
a
NotAppliedException is captured apply to the fallback function specified. |
Osgl.F1<T,Osgl.Var<T>> |
Osgl.Var._f.setter() |
Osgl.F1<T,Osgl.Var<T>> |
Osgl.Var._f.updater(Osgl.Func2<T,T,T> changer) |
Osgl.F1<T,Osgl.Var<T>> |
Osgl.Var._f.updater(Osgl.Function<T,T> changer) |
| Modifier and Type | Method and Description |
|---|---|
R |
Osgl.F1.applyOrElse(P1 p1,
Osgl.F1<? super P1,? extends R> fallback)
Applies this partial function to the given argument when it is contained in the function domain.
|
| Modifier and Type | Class and Description |
|---|---|
class |
BigDecimalValueObjectCodec |
class |
BigIntegerValueObjectCodec |
class |
FastJsonObjectCodec |
class |
KeywordValueObjectCodec |
class |
KVCodec |
class |
SimpleObjectFactory |
class |
StringValueResolver<T>
A String value resolver resolves a
string value into
a certain type of object instance. |
| Modifier and Type | Field and Description |
|---|---|
static Osgl.F1<String,String> |
S.F.CAP_FIRST |
static Osgl.F1 |
N.F.DBL |
static Osgl.F1 |
N.F.HALF |
static Osgl.F1<String,Integer> |
S.F.LENGTH |
static Osgl.F1<Number,Number> |
N.F.NEGATIVE |
protected Osgl.F1<ELEMENT,ELEMENT> |
LazyRange.next |
protected Osgl.F1<ELEMENT,ELEMENT> |
LazyRange.prev |
static Osgl.F1<Integer,String> |
S.F.RANDOM_N |
static Osgl.F1<String,List<String>> |
S.F.SPLIT
A split function that use the
S.COMMON_SEP to split Strings |
static Osgl.F1<String,String> |
S.F.TO_LOWERCASE |
static Osgl.F1<String,String> |
S.F.TO_UPPERCASE |
static Osgl.F1<String,String> |
S.F.TRIM |
| Modifier and Type | Method and Description |
|---|---|
static <L extends C.List<? super T>,T> |
C.F.add(int index,
T element)
Returns a function that add specified element into the argument list at specified position.
|
static <T extends Number> |
N.F.add(Number n) |
static <T extends Number> |
N.F.add(Number n,
Class<T> clz) |
static <L extends C.List<? super T>,T> |
C.F.addTo(int index,
L destination)
Returns a function that add the argument into the specified list at specified position.
|
static Osgl.F1<String,String> |
S.F.append(String appendix) |
static <T> Osgl.F1<T,C.Sequence<? super T>> |
C.F.appendTo(C.Sequence<? super T> sequence)
Returns a function that append the argument to a
C.Sequence specified |
static <T> Osgl.F1<T,Deque<? super T>> |
C.F.appendTo(Deque<? super T> deque)
Returns a function that append the argument to a
Deque specified |
static <T extends Number> |
N.F.cbrt() |
static <T extends Number> |
N.F.cubic() |
static <T extends Number> |
N.F.cubic(Class<T> clz) |
static <T extends Number> |
N.F.dbl() |
static <T extends Number> |
N.F.dbl(Class<T> clz) |
static <T extends Number> |
N.F.div(Number n)
Deprecated.
|
static <T extends Number> |
N.F.div(Number n,
Class<T> clz)
Deprecated.
|
static <T extends Number> |
N.F.divideBy(Number n) |
static <T extends Number> |
N.F.divideBy(Number n,
Class<T> type) |
static Osgl.F1<String,String> |
S.F.first(int n) |
static <T> Osgl.F1<Iterable<? extends T>,Void> |
C.F.forEachIterable(Osgl.Function<? super T,?> visitor)
Returns a function that apply the visitor function specified on the argument (iterable)
|
static <T extends Number> |
N.F.half() |
static <T extends Number> |
N.F.half(Class<T> clz) |
static Osgl.F1<String,String> |
S.F.last(int n) |
static Osgl.F1<String,String> |
S.F.maxLength(int n) |
static <T extends Number> |
N.F.mul(Number n)
Deprecated.
|
static <T extends Number> |
N.F.mul(Number n,
Class<T> clz)
Deprecated.
|
static <T extends Number> |
N.F.multiplyBy(Number n) |
static <T extends Number> |
N.F.multiplyBy(Number n,
Class<T> clz) |
static Osgl.F1<String,String> |
S.F.prepend(String prependix) |
static <T> Osgl.F1<T,C.Sequence<? super T>> |
C.F.prependTo(C.Sequence<? super T> sequence)
Returns a function that prepend the argument to a
C.Sequence specified |
static <T> Osgl.F1<T,Deque<? super T>> |
C.F.prependTo(Deque<? super T> deque)
Returns a function that prepend an element to a deque specified and return the
deque instance
|
static <T extends Number> |
N.F.sign() |
static Osgl.F1<String,List<String>> |
S.F.split(String sep) |
static <T extends Number> |
N.F.sqr() |
static <T extends Number> |
N.F.sqr(Class<T> clz) |
static <T extends Number> |
N.F.sqrt() |
Copyright © 2017. All Rights Reserved.