| Package | Description |
|---|---|
| org.osgl | |
| org.osgl.util | |
| org.osgl.util.algo | |
| org.osgl.util.converter |
| Modifier and Type | Class and Description |
|---|---|
static class |
Lang.Operator<T> |
static class |
Lang.Predicate<T>
Predicate is a predefined Function<Boolean, T> typed function with a set of utilities dealing with boolean operations. |
static class |
Lang.Processor<T>
Define a processor function which applied to one parameter and return the parameter instance after processing on the parameter
|
static class |
Lang.Transformer<FROM,TO>
A Transformer is literally a kind of
Lang.F1 function |
static class |
Lang.TypeConverter<FROM,TO>
A
TypeConverter is a Lang.Transformer that convert a type to another |
static class |
Lang.V1<P1> |
static class |
Lang.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 Lang.F1 |
Lang.F.AS_STRING
A predefined function that when applied to an object instance, returns String representation of the instance
|
static Lang.F1 |
Lang.F1
A dumb
Lang.Function implementation that does nothing and return null |
static Lang.F1 |
Lang.F.HASH_CODE
A predefined function that calculate hash code of an object
|
static Lang.F1 |
Lang.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 |
|---|---|
Lang.F1<P1,R> |
Lang.F1.andThen(Lang.Function<? super P1,? extends R>... afters)
Returns a composed function that applied, in sequence, this function and all functions specified one by one.
|
<T> Lang.F1<P1,T> |
Lang.F1.andThen(Lang.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> Lang.F1<T,String> |
Lang.F.asString()
A type-safe version of
Lang.F.AS_STRING. |
static <T> Lang.F1<T,String> |
Lang.F.asString(Class<T> tClass)
Type safe version of
Lang.F.AS_STRING. |
static <T> Lang.F1<T,Void> |
Lang.F.breakIf(Lang.Function<? super T,Boolean> predicate)
Return a one variable function that throw out a
Lang.Break when a predicate return true on an element been tested. |
static <P,T> Lang.F1<T,Void> |
Lang.F.breakIf(Lang.Function<? super T,Boolean> predicate,
P payload)
Return a one variable function that throw out a
Lang.Break with payload specified when a predicate return true on an element been tested |
<X1> Lang.F1<X1,R> |
Lang.F1.compose(Lang.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 |
Lang.F1<P1,R> |
Lang.F2.curry(P2 p2) |
Lang.F1<P1,R> |
Lang.F3.curry(P2 p2,
P3 p3) |
Lang.F1<P1,R> |
Lang.F4.curry(P2 p2,
P3 p3,
P4 p4) |
Lang.F1<P1,R> |
Lang.F5.curry(P2 p2,
P3 p3,
P4 p4,
P5 p5) |
<R> Lang.F1<T,Lang.Option<R>> |
Lang.Predicate.elseThen(Lang.Function<? super T,R> func) |
static <P1,R> Lang.F1<P1,R> |
Lang.f1()
The type-safe version of
Lang.F1 |
static <X,Y> Lang.F1<X,Y> |
Lang.f1(Lang.Bijection<X,Y> f1) |
static <P1,R> Lang.F1<P1,R> |
Lang.f1(Lang.Function<? super P1,? extends R> f1)
Convert a general
Lang.Function function into a Lang.F1 typed function |
static <T extends Comparable<T>> |
Lang.F.greaterThan(T v)
Alias of
Lang.F.gt(Comparable) |
static <T extends Comparable<T>> |
Lang.F.greaterThanOrEqualsTo(T v)
Alias of
Lang.F.gte(Comparable) |
static <T extends Comparable<T>> |
Lang.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>> |
Lang.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> Lang.F1<T,Integer> |
Lang.F.hc()
The type-safe version of
Lang.F.HASH_CODE |
static <T> Lang.F1<T,T> |
Lang.F.identity()
The type-safe version of
Lang.F.IDENTITY |
static <T> Lang.F1<T,T> |
Lang.F.identity(Class<T> clz)
The type-safe version of
Lang.F.IDENTITY |
<R> Lang.F1<T,Lang.Option<R>> |
Lang.Predicate.ifThen(Lang.Function<? super T,R> func) |
static <T extends Comparable<T>> |
Lang.F.lessThan(T v)
Alias of
Lang.F.lt(Comparable) |
static <T extends Comparable<T>> |
Lang.F.lessThanOrEqualsTo(T v)
Alias of
Lang.F.lte(Comparable) |
Lang.F1<P1,Lang.Option<R>> |
Lang.F1.lift()
Turns this partial function into a plain function returning an Option result.
|
static <T extends Comparable<T>> |
Lang.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>> |
Lang.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> Lang.F1<R,Lang.Var<T>> |
Lang.Var._f.mapper(Lang.Function<R,T> mapper) |
static <T> Lang.F1<T,Boolean> |
Lang.F.not()
Returns a function that evaluate an argument’s boolean value and negate the value.
|
Lang.F1<P1,R> |
Lang.F1.orElse(Lang.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. |
Lang.F1<T,Lang.Var<T>> |
Lang.Var._f.setter() |
Lang.F1<T,Lang.Var<T>> |
Lang.Var._f.updater(Lang.Func2<T,T,T> changer) |
Lang.F1<T,Lang.Var<T>> |
Lang.Var._f.updater(Lang.Function<T,T> changer) |
| Modifier and Type | Method and Description |
|---|---|
R |
Lang.F1.applyOrElse(P1 p1,
Lang.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 Lang.F1 |
N.F.DBL |
static Lang.F1 |
N.F.HALF |
static Lang.F1<Number,Number> |
N.F.NEGATIVE |
protected Lang.F1<ELEMENT,ELEMENT> |
LazyRange.next |
protected Lang.F1<ELEMENT,ELEMENT> |
LazyRange.prev |
| 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 <T> Lang.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> Lang.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 <T> Lang.F1<Iterable<? extends T>,Void> |
C.F.forEachIterable(Lang.Visitor<? 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 <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 <T> Lang.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> Lang.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 <T extends Number> |
N.F.sqr() |
static <T extends Number> |
N.F.sqr(Class<T> clz) |
static <T extends Number> |
N.F.sqrt() |
| Modifier and Type | Class and Description |
|---|---|
class |
PreprocessedStringSearch
Encapsulate a preprocessed String search which contains 1.
|
| Modifier and Type | Class and Description |
|---|---|
class |
JsonArrayToXml |
class |
JsonObjectToXml |
class |
XmlToJson |
Copyright © 2014–2021 OSGL (Open Source General Library). All rights reserved.