public static enum Osgl.F extends Enum<Osgl.F>
| Modifier and Type | Field and Description |
|---|---|
static Osgl.F1 |
AS_STRING
A predefined function that when applied to an object instance, returns
String representation of the instance
|
static Osgl.F2 |
EQ
A predefined function that applies to two parameters and check if they are equals to each other
|
static Osgl.F2 |
EQUAL
Alias of
EQ |
static Osgl.Predicate |
FALSE
A predefined forever FALSE predicate which always return
false for whatever element been tested |
static Osgl.F2 |
GREATER_THAN
A function that apply to two parameters then return
true if the first parameter
is greater than the second one. |
static Osgl.F2 |
GREATER_THAN_OR_EQUAL_TO
A function that apply to two parameters then return
true if the first parameter
is greater than or equal to the second one. |
static Osgl.F1 |
HASH_CODE
A predefined function that calculate hash code of an object
|
static Osgl.F1 |
IDENTITY
A predefined function that when apply to a parameter it return it directly, so for any Object o
|
static Osgl.Predicate |
IS_NULL
|
static Osgl.F2 |
LESS_THAN
A function that apply to two parameters then return
true if the first parameter
is less than the second one. |
static Osgl.F2 |
LESS_THAN_OR_EQUAL_TO
A function that apply to two parameters then return
true if the first parameter
is less than or equal to the second one. |
static Osgl.Comparator |
NATURAL_ORDER |
static Osgl.F2 |
NE
A predefined function that applies to two parameters and check if they are not equals to
each other.
|
static Osgl.Predicate<Field> |
NON_STATIC_FIELD
A predicate function that when applied to a
Field type
object, returns `true` when the field is not static |
static Osgl.F2 |
NOT_EQUAL
Alias of
NE |
static Osgl.Predicate |
NOT_NULL
A predefined
Predicate predicate test if the element
specified is NOT null |
static Osgl.Comparator |
REVERSE_ORDER |
static Osgl.Predicate |
TRUE
A predefined forever true predicate which returns
true
on any element been tested |
| Modifier and Type | Method and Description |
|---|---|
static <T> Osgl.Predicate<T> |
and(Collection<Osgl.Function<? super T,Boolean>> predicates)
Returns a composed
Osgl.Predicate function that for any given parameter, the test result is true
only when all of the specified predicates returns true when applied to the parameter |
static <T> Osgl.Predicate<T> |
and(Osgl.Function<? super T,Boolean>... predicates)
Returns a composed
Osgl.Predicate function that for any given parameter, the test result is true
only when all of the specified predicates returns true when applied to the parameter |
static <T> Osgl.Predicate<T> |
any(Collection<Osgl.Function<? super T,Boolean>> predicates)
Alias of
or(Collection) |
static <T> Osgl.Predicate<T> |
any(Osgl.Function<? super T,Boolean>... predicates)
Alias of
or(Osgl.Function[]) |
static <T> Osgl.F1<T,String> |
asString()
A type-safe version of
AS_STRING. |
static <T> Osgl.F1<T,String> |
asString(Class<T> tClass)
Type safe version of
AS_STRING. |
static <T1,T2> Osgl.F2<T1,T2,Void> |
breakIf(Osgl.Func2<? super T1,? super T2,Boolean> predicate)
Return a two variables function that throw out a
Osgl.Break when a two variables predicate return
true on an element been tested. |
static <P,T1,T2> Osgl.F2<T1,T2,Void> |
breakIf(Osgl.Func2<? super T1,? super T2,Boolean> predicate,
P payload)
Return a two variables function that throw out a
Osgl.Break with payload specified when
a two variables predicate return true on an element been tested |
static <T1,T2,T3> Osgl.F3<T1,T2,T3,Void> |
breakIf(Osgl.Func3<? super T1,? super T2,? super T3,Boolean> predicate)
Return a three variables function that throw out a
Osgl.Break when a three variables predicate return
true on an element been tested. |
static <P,T1,T2,T3> |
breakIf(Osgl.Func3<? super T1,? super T2,? super T3,Boolean> predicate,
P payload)
Return a three variables function that throw out a
Osgl.Break with payload specified when
a three variables predicate return true on an element been tested |
static <T1,T2,T3,T4> |
breakIf(Osgl.Func4<? super T1,? super T2,? super T3,? super T4,Boolean> predicate)
Return a four variables function that throw out a
Osgl.Break when the predicate returns
true on an element been tested. |
static <P,T1,T2,T3,T4> |
breakIf(Osgl.Func4<? super T1,? super T2,? super T3,? super T4,Boolean> predicate,
P payload)
Return a four variables function that throw out a
Osgl.Break with payload specified when
a four variables predicate return true on an element been tested |
static <T1,T2,T3,T4,T5> |
breakIf(Osgl.Func5<? super T1,? super T2,? super T3,? super T4,? super T5,Boolean> predicate)
Return a five variables function that throw out a
Osgl.Break when the predicate returns
true on an element been tested. |
static <P,T1,T2,T3,T4,T5> |
breakIf(Osgl.Func5<? super T1,? super T2,? super T3,? super T4,? super T5,Boolean> predicate,
P payload)
Return a five variables function that throw out a
Osgl.Break with payload specified when
a five variables predicate return true on an element been tested |
static <T> Osgl.F1<T,Void> |
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> |
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 |
static <T,U extends Comparable<? super U>> |
comparing(Osgl.Function<? super T,? extends U> keyExtractor) |
static <T,U> Osgl.Comparator<T> |
comparing(Osgl.Function<? super T,? extends U> keyExtractor,
Comparator<? super U> keyComparator)
Construct a
Comparator with a function to extract the key of type U from given object of type T and
a comparator to compare type U |
static <P1,P2> Osgl.F2<P1,P2,Boolean> |
eq()
The type-safe version of
EQ |
static <P> Osgl.Predicate<P> |
eq(P element)
Returns a
Osgl.Predicate that checkes if the argument
equals to the element specified |
static <P1,P2> Osgl.F2<P1,P2,Boolean> |
equal()
Alias of
eq() |
static Osgl.Predicate<Field> |
fieldWithAnnotation(Class<? extends Annotation> annoClass)
Returns a predicate function that when applied to a
Field type
object, returns `true` if the field has specified annotation presented |
static <T extends Comparable<T>> |
greaterThan()
Alias of
gt() |
static <T> Osgl.F2<T,T,Boolean> |
greaterThan(Comparator<? super T> c)
Alias of
gt(java.util.Comparator) |
static <T> Osgl.F2<T,T,Boolean> |
greaterThan(Osgl.Func2<? super T,? super T,Integer> c)
Alias of
gt(java.util.Comparator) |
static <T extends Comparable<T>> |
greaterThan(T v)
Alias of
gt(Comparable) |
static <T extends Comparable<T>> |
greaterThanOrEqualsTo()
Alias of
gte() |
static <T> Osgl.F2<T,T,Boolean> |
greaterThanOrEqualsTo(Comparator<? super T> c)
Alias of
gte(java.util.Comparator) |
static <T> Osgl.F2<T,T,Boolean> |
greaterThanOrEqualsTo(Osgl.Func2<? super T,? super T,Integer> c)
Alias of
gte(java.util.Comparator) |
static <T extends Comparable<T>> |
greaterThanOrEqualsTo(T v)
Alias of
gte(Comparable) |
static <T extends Comparable<T>> |
gt()
Returns a function that check if a value is less than another one.
|
static <T> Osgl.F2<T,T,Boolean> |
gt(Comparator<? super T> c)
Returns a function that check if a value is less than another one using the
Comparator specified |
static <T> Osgl.F2<T,T,Boolean> |
gt(Osgl.Func2<? super T,? super T,Integer> c)
Returns a function that check if a value is less than another one using the
Comparator specified |
static <T extends Comparable<T>> |
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>> |
gte()
Returns a function that check if a value is greater than or equals to another one.
|
static <T> Osgl.F2<T,T,Boolean> |
gte(Comparator<? super T> c)
Returns a function that check if a value is greater than or equals to another one
using the
Comparator specified |
static <T> Osgl.F2<T,T,Boolean> |
gte(Osgl.Func2<? super T,? super T,Integer> c)
Returns a function that check if a value is greater than or equals to another one
using the
Comparator specified |
static <T extends Comparable<T>> |
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> |
hc()
The type-safe version of
HASH_CODE |
static <T> Osgl.F1<T,T> |
identity()
The type-safe version of
IDENTITY |
static <T> Osgl.F1<T,T> |
identity(Class<T> clz)
The type-safe version of
IDENTITY |
static <X,Y> Osgl.Bijection<Y,X> |
invert(Osgl.Bijection<X,Y> f)
Returns a inverted function of
Osgl.Bijection which map from X to Y, and the
returned function map from Y to X. |
static <T> Osgl.Predicate<T> |
isNull()
The type-safe version of
IS_NULL |
static <T> Osgl.Predicate<T> |
isNull(Class<T> c)
The type-safe version of
IS_NULL |
static <T extends Comparable<T>> |
lessThan()
Alias of
lt() |
static <T> Osgl.F2<T,T,Boolean> |
lessThan(Comparator<? super T> c)
Alias of
lt(java.util.Comparator) |
static <T> Osgl.F2<T,T,Boolean> |
lessThan(Osgl.Func2<? super T,? super T,Integer> c)
Alias of
lt(java.util.Comparator) |
static <T extends Comparable<T>> |
lessThan(T v)
Alias of
lt(Comparable) |
static <T extends Comparable<T>> |
lessThanOrEqualsTo()
Alias of
lte() |
static <T> Osgl.F2<T,T,Boolean> |
lessThanOrEqualsTo(Comparator<? super T> c)
Alias of
lte(java.util.Comparator) |
static <T> Osgl.F2<T,T,Boolean> |
lessThanOrEqualsTo(Osgl.Func2<? super T,? super T,Integer> c)
Alias of
lte(java.util.Comparator) |
static <T extends Comparable<T>> |
lessThanOrEqualsTo(T v)
Alias of
lte(Comparable) |
static <T extends Comparable<T>> |
lt()
Returns a function that check if a value is less than another one.
|
static <T> Osgl.F2<T,T,Boolean> |
lt(Comparator<? super T> c)
Returns a function that check if a value is less than another one using the
Comparator specified |
static <T> Osgl.F2<T,T,Boolean> |
lt(Osgl.Func2<? super T,? super T,Integer> c)
Returns a function that check if a value is less than another one using the
Comparator specified |
static <T extends Comparable<T>> |
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>> |
lte()
Returns a function that check if a value is less than or equals to another one.
|
static <T> Osgl.F2<T,T,Boolean> |
lte(Comparator<? super T> c)
Returns a function that check if a value is less than or equals to another one
using the
Comparator specified |
static <T> Osgl.F2<T,T,Boolean> |
lte(Osgl.Func2<? super T,? super T,Integer> c)
Returns a function that check if a value is less than or equals to another one
using the
Comparator specified |
static <T extends Comparable<T>> |
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 |
static <T extends Comparable<T>> |
naturalOrder() |
static <P1,P2> Osgl.F2<P1,P2,Boolean> |
ne()
The type-safe version of
NE |
static Osgl.F0<Boolean> |
negate(Osgl.Func0<Boolean> predicate)
Returns a negate function of the specified predicate function
|
static <P1,P2> Osgl.F2<P1,P2,Boolean> |
negate(Osgl.Func2<? super P1,? super P2,Boolean> predicate)
Returns a negate function of the specified predicate that applied to 2 parameters and returns boolean value
|
static <P1,P2,P3> Osgl.F3<P1,P2,P3,Boolean> |
negate(Osgl.Func3<? super P1,? super P2,? super P3,Boolean> predicate)
Returns a negate function of the specified predicate that applied to 3 parameters and returns boolean value
|
static <P1,P2,P3,P4> |
negate(Osgl.Func4<? super P1,? super P2,? super P3,? super P4,Boolean> predicate)
Returns a negate function of the specified predicate that applied to 3 parameters and returns boolean value
|
static <P1,P2,P3,P4,P5> |
negate(Osgl.Func5<? super P1,? super P2,? super P3,? super P4,? super P5,Boolean> predicate)
Returns a negate function of the specified predicate that applied to 3 parameters and returns boolean value
|
static <T> Osgl.Predicate<T> |
negate(Osgl.Function<? super T,Boolean> predicate)
Returns a negate function of the specified predicate function that applied to 1 params and
returns boolean value
|
static <T> Osgl.Predicate<T> |
no()
A type-safe version of
FALSE |
static <T> Osgl.Predicate<T> |
none(Collection<Osgl.Function<? super T,Boolean>> predicates)
Negation of
or(Collection) |
static <T> Osgl.Predicate<T> |
none(Osgl.Function<? super T,Boolean>... predicates)
Negation of
or(Osgl.Function[]) |
static <T> Osgl.F1<T,Boolean> |
not()
Returns a function that evaluate an argument's boolean value and negate the value
|
static <P1,P2> Osgl.F2<P1,P2,Boolean> |
notEqual()
Alias of
ne() |
static <T> Osgl.Predicate<T> |
notNull()
The type-safe version of
NOT_NULL |
static <T> Osgl.Predicate<T> |
or(Collection<Osgl.Function<? super T,Boolean>> predicates)
Returns a composed
Osgl.Predicate function that for any given parameter, the test result is true
only when any one of the specified predicates returns true when applied to the parameter |
static <T> Osgl.Predicate<T> |
or(Osgl.Function<? super T,Boolean>... predicates)
Returns a composed
Osgl.Predicate function that for any given parameter, the test result is true
when any one of the specified predicates returns true on the parameter |
static <BEAN> Osgl.Transformer<BEAN,Object> |
propertyExtractor(String property) |
static <T> Osgl.Comparator<T> |
reverse(Comparator<? super T> c) |
static <T extends Comparable<? super T>> |
reverseOrder() |
static Osgl.F |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Osgl.F[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static <T> Osgl.Predicate<T> |
yes()
A type-safe version of
TRUE |
public static final Osgl.Predicate TRUE
true
on any element been testedyes()public static final Osgl.Predicate FALSE
false for whatever element been testedno()public static final Osgl.Predicate IS_NULL
public static final Osgl.Predicate NOT_NULL
Predicate predicate test if the element
specified is NOT nullpublic static final Osgl.F1 IDENTITY
IDENTITY.apply(o) == o;
public static final Osgl.F2 LESS_THAN
true if the first parameter
is less than the second one. The type of the two parameter should be the same and should
implements Comparablepublic static final Osgl.F2 GREATER_THAN
true if the first parameter
is greater than the second one. The type of the two parameter should be the same and should
implements Comparablepublic static final Osgl.F2 LESS_THAN_OR_EQUAL_TO
true if the first parameter
is less than or equal to the second one. The type of the two parameter should be the same
and should implements Comparablepublic static final Osgl.F2 GREATER_THAN_OR_EQUAL_TO
true if the first parameter
is greater than or equal to the second one. The type of the two parameter should be the same
and should implements Comparablepublic static final Osgl.F2 EQ
public static final Osgl.F2 NE
EQpublic static final Osgl.Comparator NATURAL_ORDER
public static final Osgl.Comparator REVERSE_ORDER
public static final Osgl.F1 HASH_CODE
Osgl.hc(Object)public static final Osgl.F1 AS_STRING
Osgl.toString2(Object)public static Osgl.Predicate<Field> NON_STATIC_FIELD
Field type
object, returns `true` when the field is not staticpublic static Osgl.F[] values()
for (Osgl.F c : Osgl.F.values()) System.out.println(c);
public static Osgl.F valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static <P,T> Osgl.F1<T,Void> breakIf(Osgl.Function<? super T,Boolean> predicate, P payload)
Osgl.Break with payload specified when a predicate return
true on an element been testedP - the type of the payload objectT - the type of the object to be consumed by the predicatepredicate - the predicate function that takes T type argumentpayload - the payload to be passed into the Osgl.Break if predicate returns truetrue
then throw out the Break with payload specifiedpublic static <T> Osgl.F1<T,Void> breakIf(Osgl.Function<? super T,Boolean> predicate)
Osgl.Break when a predicate return
true on an element been tested. There is no payload specified and the Break
will use test result i.e. true as the payloadT - the type of the object consumed by the predicatepredicate - the predicate functiontrue then
throw out a Osgl.Break with payload of the object been consumedpublic static <P,T1,T2> Osgl.F2<T1,T2,Void> breakIf(Osgl.Func2<? super T1,? super T2,Boolean> predicate, P payload)
Osgl.Break with payload specified when
a two variables predicate return true on an element been testedP - the payload typeT1 - the type of the first argumentT2 - the type of the second argumentpredicate - the function test the argumentspayload - the payload to be thrown out if predicate function returns true on
the argumentOsgl.Break with payload
specifiedpublic static <T1,T2> Osgl.F2<T1,T2,Void> breakIf(Osgl.Func2<? super T1,? super T2,Boolean> predicate)
Osgl.Break when a two variables predicate return
true on an element been tested. There is no payload specified and the Break
will use test result i.e. true as the payloadT1 - the type of argument 1T2 - the type of argument 2predicate - the predicate function check if a break should be raisedOsgl.Break if predicate function says true on the
two argumentspublic static <P,T1,T2,T3> Osgl.F3<T1,T2,T3,Void> breakIf(Osgl.Func3<? super T1,? super T2,? super T3,Boolean> predicate, P payload)
Osgl.Break with payload specified when
a three variables predicate return true on an element been testedP - Generic type for payloadT1 - generic type of the first argument taken by predicateT2 - generic type of the second argument taken by predicateT3 - generic type of the thrid argument taken by predicatepredicate - the predicate function that takes three arguments and returns a boolean type valuepayload - the payload object to beF3<T1, T2, T3, Void> typepublic static <T1,T2,T3> Osgl.F3<T1,T2,T3,Void> breakIf(Osgl.Func3<? super T1,? super T2,? super T3,Boolean> predicate)
Osgl.Break when a three variables predicate return
true on an element been tested. There is no payload specified and the Break
will use test result i.e. true as the payloadT1 - the generic type of the argument 1T2 - the generic type of the argument 2T3 - the generic type of the argument 3predicate - the predicate function that takes three arguments and returns a boolean type valuetrue if the check returns truepublic static <P,T1,T2,T3,T4> Osgl.F4<T1,T2,T3,T4,Void> breakIf(Osgl.Func4<? super T1,? super T2,? super T3,? super T4,Boolean> predicate, P payload)
Osgl.Break with payload specified when
a four variables predicate return true on an element been testedP - the generic type of the payloadT1 - the generic type of the argument 1T2 - the generic type of the argument 2T3 - the generic type of the argument 3T4 - the generic type of the argument 4predicate - the predicate function that takes four arguments and returns a boolean type valuepayload - the payload to be throw out if the predicate function returns true on given argumentstruepublic static <T1,T2,T3,T4> Osgl.F4<T1,T2,T3,T4,Void> breakIf(Osgl.Func4<? super T1,? super T2,? super T3,? super T4,Boolean> predicate)
Osgl.Break when the predicate returns
true on an element been tested. There is no payload specified and the Break
will use test result i.e. true as the payloadT1 - the generic type of the argument 1T2 - the generic type of the argument 2T3 - the generic type of the argument 3T4 - the generic type of the argument 4predicate - the predicate function that takes four arguments and returns a boolean type valuetrue if the check returns truepublic static <P,T1,T2,T3,T4,T5> Osgl.F5<T1,T2,T3,T4,T5,Void> breakIf(Osgl.Func5<? super T1,? super T2,? super T3,? super T4,? super T5,Boolean> predicate, P payload)
Osgl.Break with payload specified when
a five variables predicate return true on an element been testedP - the generic type of the payloadT1 - the generic type of the argument 1T2 - the generic type of the argument 2T3 - the generic type of the argument 3T4 - the generic type of the argument 4T5 - the generic type of the argument 5predicate - the predicate function that takes five arguments and returns a boolean type valuepayload - the payload to be throw out if the predicate function returns true on given argumentstruepublic static <T1,T2,T3,T4,T5> Osgl.F5<T1,T2,T3,T4,T5,Void> breakIf(Osgl.Func5<? super T1,? super T2,? super T3,? super T4,? super T5,Boolean> predicate)
Osgl.Break when the predicate returns
true on an element been tested. There is no payload specified and the Break
will use test result i.e. true as the payloadT1 - the generic type of the argument 1T2 - the generic type of the argument 2T3 - the generic type of the argument 3T4 - the generic type of the argument 4T5 - the generic type of the argument 5predicate - the predicate function that takes five arguments and returns a boolean type valuetrue if the check returns truepublic static <T> Osgl.Predicate<T> and(Collection<Osgl.Function<? super T,Boolean>> predicates)
Osgl.Predicate function that for any given parameter, the test result is true
only when all of the specified predicates returns true when applied to the parameterT - the type of the parameter the predicates applied topredicates - a collection of predicates that can be applied to a parameter and returns boolean valuepublic static <T> Osgl.Predicate<T> and(Osgl.Function<? super T,Boolean>... predicates)
Osgl.Predicate function that for any given parameter, the test result is true
only when all of the specified predicates returns true when applied to the parameterT - the type of the parameter the predicates applied topredicates - an array of predicates that can be applied to a parameter and returns boolean valuepublic static <T> Osgl.Predicate<T> or(Collection<Osgl.Function<? super T,Boolean>> predicates)
Osgl.Predicate function that for any given parameter, the test result is true
only when any one of the specified predicates returns true when applied to the parameterT - the type of the parameter the predicates applied topredicates - a collection of predicates that can be applied to a parameter and returns boolean valuepublic static <T> Osgl.Predicate<T> or(Osgl.Function<? super T,Boolean>... predicates)
Osgl.Predicate function that for any given parameter, the test result is true
when any one of the specified predicates returns true on the parameterT - the type of the parameter the predicates applied topredicates - an array of predicates that can be applied to a parameter and returns boolean valuepublic static <T> Osgl.Predicate<T> any(Collection<Osgl.Function<? super T,Boolean>> predicates)
or(Collection)T - the element typepredicates - the predicate functionstrue if any one of the predicates returns true
on a given argumentpublic static <T> Osgl.Predicate<T> any(Osgl.Function<? super T,Boolean>... predicates)
or(Osgl.Function[])T - the argument typepredicates - an array of predicate functionstrue if any one of the predicate function
returns truepublic static <T> Osgl.Predicate<T> none(Collection<Osgl.Function<? super T,Boolean>> predicates)
or(Collection)T - the generic type of the argument the predicate functions takepredicates - an iterable of predicate functionstrue if all of them return false on the argument, or
false if any one of them returns truepublic static <T> Osgl.Predicate<T> none(Osgl.Function<? super T,Boolean>... predicates)
or(Osgl.Function[])T - the generic type of the argument the predicate functions takepredicates - an array of predicate functionstrue if all of them return false on the argument, or
false if any one of them returns truepublic static <T> Osgl.F1<T,Boolean> not()
T - the type of the argument the function applied topublic static <X,Y> Osgl.Bijection<Y,X> invert(Osgl.Bijection<X,Y> f)
Osgl.Bijection which map from X to Y, and the
returned function map from Y to X. This function will call Osgl.Bijection.invert()
to get the return functionX - the argument type, and the result type of the return functionY - the result type, and the argument type of the return functionf - the bijection function to be invertedfpublic static Osgl.F0<Boolean> negate(Osgl.Func0<Boolean> predicate)
predicate - the specified function that returns boolean valuepublic static <T> Osgl.Predicate<T> negate(Osgl.Function<? super T,Boolean> predicate)
T - the type of the parameter to be appliedpredicate - the specified function that applied to the parameter and returns boolean valuepublic static <P1,P2> Osgl.F2<P1,P2,Boolean> negate(Osgl.Func2<? super P1,? super P2,Boolean> predicate)
P1 - type of param oneP2 - type of param twopredicate - the function applied to 2 params and return boolean valuepublic static <P1,P2,P3> Osgl.F3<P1,P2,P3,Boolean> negate(Osgl.Func3<? super P1,? super P2,? super P3,Boolean> predicate)
P1 - type of param oneP2 - type of param twoP3 - type of param threepredicate - the function applied to 2 params and return boolean valuepublic static <P1,P2,P3,P4> Osgl.F4<P1,P2,P3,P4,Boolean> negate(Osgl.Func4<? super P1,? super P2,? super P3,? super P4,Boolean> predicate)
P1 - type of param oneP2 - type of param twoP3 - type of param threeP4 - type of param fourpredicate - the function applied to 2 params and return boolean valuepublic static <P1,P2,P3,P4,P5> Osgl.F5<P1,P2,P3,P4,P5,Boolean> negate(Osgl.Func5<? super P1,? super P2,? super P3,? super P4,? super P5,Boolean> predicate)
P1 - type of param oneP2 - type of param twoP3 - type of param threeP4 - type of param fourP5 - type of param fivepredicate - the function applied to 2 params and return boolean valuepublic static <T> Osgl.Predicate<T> yes()
TRUET - the argument typetruepublic static <T> Osgl.Predicate<T> no()
FALSET - the argument typefalsepublic static <T> Osgl.Predicate<T> isNull()
IS_NULLT - the argument typenull or NONEpublic static <T> Osgl.Predicate<T> isNull(Class<T> c)
IS_NULLT - the argument typec - the class that specifies the argument typenull or NONEpublic static <T> Osgl.Predicate<T> notNull()
NOT_NULLT - the element typenull or NONEpublic static <T> Osgl.F1<T,T> identity()
IDENTITYT - the element typepublic static <T> Osgl.F1<T,T> identity(Class<T> clz)
IDENTITYT - the generic typeclz - the class that restrict the type of <T>public static <T extends Comparable<T>> Osgl.F1<T,Boolean> lt(T v)
v specified,
returns true if the parameter applied is less than vT - the type of the value and parameterv - the value to be compare with the function parameterpublic static <T extends Comparable<T>> Osgl.F1<T,Boolean> lessThan(T v)
lt(Comparable)T - the element typev - a value used to check against function argumentpublic static <T extends Comparable<T>> Osgl.F1<T,Boolean> gt(T v)
v specified,
returns true if the parameter applied is greater than vT - the type of the value and parameterv - the value to be compare with the function parameterpublic static <T extends Comparable<T>> Osgl.F1<T,Boolean> greaterThan(T v)
gt(Comparable)T - the element typev - the value used to check against function argumentpublic static <T extends Comparable<T>> Osgl.F1<T,Boolean> gte(T v)
v specified,
returns true if the parameter applied is greater than or equals to vT - the type of the value and parameterv - the value to be compare with the function parameterpublic static <T extends Comparable<T>> Osgl.F1<T,Boolean> greaterThanOrEqualsTo(T v)
gte(Comparable)T - the element typev - the value used to check against function argumentpublic static <T extends Comparable<T>> Osgl.F1<T,Boolean> lte(T v)
v specified,
returns true if the parameter applied is less than or equals to vT - the type of the value and parameterv - the value to be compare with the function parameterpublic static <T extends Comparable<T>> Osgl.F1<T,Boolean> lessThanOrEqualsTo(T v)
lte(Comparable)T - the element typev - the value to be used to check agains function arugmentpublic static <T extends Comparable<T>> Osgl.F2<T,T,Boolean> lt()
LESS_THANT - The type of the value been compared, should implements Comparablepublic static <T extends Comparable<T>> Osgl.F2<T,T,Boolean> lessThan()
lt()T - The type of the value been compared, should implements Comparablepublic static <T extends Comparable<T>> Osgl.F2<T,T,Boolean> lte()
LESS_THAN_OR_EQUAL_TOT - The type of the value been compared, should implements Comparablepublic static <T extends Comparable<T>> Osgl.F2<T,T,Boolean> lessThanOrEqualsTo()
lte()T - The type of the value been compared, should implements Comparablepublic static <T extends Comparable<T>> Osgl.F2<T,T,Boolean> gt()
T - The type of the value been compared, should implements Comparablepublic static <T extends Comparable<T>> Osgl.F2<T,T,Boolean> greaterThan()
gt()T - The type of the value been compared, should implements Comparablepublic static <T extends Comparable<T>> Osgl.F2<T,T,Boolean> gte()
GREATER_THAN_OR_EQUAL_TOT - The type of the value been compared, should implements Comparablepublic static <T extends Comparable<T>> Osgl.F2<T,T,Boolean> greaterThanOrEqualsTo()
gte()T - the element typepublic static <T> Osgl.F2<T,T,Boolean> lt(Comparator<? super T> c)
Comparator specifiedT - The type of the value been compared, should implements Comparablec - The comparator that can compare the valuepublic static <T> Osgl.F2<T,T,Boolean> lessThan(Comparator<? super T> c)
lt(java.util.Comparator)T - element typec - a comparator functionc to check if an element is lesser than anotherpublic static <T> Osgl.F2<T,T,Boolean> gt(Comparator<? super T> c)
Comparator specifiedT - The type of the value been compared, should implements Comparablec - The comparator that can compare the valuepublic static <T> Osgl.F2<T,T,Boolean> greaterThan(Comparator<? super T> c)
gt(java.util.Comparator)T - The type of the value been compared, should implements Comparablec - The comparator that can compare the valuepublic static <T> Osgl.F2<T,T,Boolean> lte(Comparator<? super T> c)
Comparator specifiedT - The type of the value been compared, should implements Comparablec - The comparator that can compare the valuepublic static <T> Osgl.F2<T,T,Boolean> lessThanOrEqualsTo(Comparator<? super T> c)
lte(java.util.Comparator)T - the element typec - a comparator functionc to check if an element is lesser than or equals to anotherpublic static <T> Osgl.F2<T,T,Boolean> gte(Comparator<? super T> c)
Comparator specifiedT - The type of the value been compared, should implements Comparablec - The comparator that can compare the valuepublic static <T> Osgl.F2<T,T,Boolean> greaterThanOrEqualsTo(Comparator<? super T> c)
gte(java.util.Comparator)T - the element typec - a comparator functionc to check if an element is greater than or equals to anotherpublic static <T> Osgl.F2<T,T,Boolean> lt(Osgl.Func2<? super T,? super T,Integer> c)
Comparator specifiedT - The type of the value been compared, should implements Comparablec - The comparator that can compare the valuepublic static <T> Osgl.F2<T,T,Boolean> lessThan(Osgl.Func2<? super T,? super T,Integer> c)
lt(java.util.Comparator)T - the element typec - a comparator functionc to check if an element is lesser than anotherpublic static <T> Osgl.F2<T,T,Boolean> gt(Osgl.Func2<? super T,? super T,Integer> c)
Comparator specifiedT - The type of the value been compared, should implements Comparablec - The comparator that can compare the valuepublic static <T> Osgl.F2<T,T,Boolean> greaterThan(Osgl.Func2<? super T,? super T,Integer> c)
gt(java.util.Comparator)T - the element typec - a comparator functionc to check if an object is greater than anotherpublic static <T> Osgl.F2<T,T,Boolean> lte(Osgl.Func2<? super T,? super T,Integer> c)
Comparator specifiedT - The type of the value been compared, should implements Comparablec - The comparator that can compare the valuepublic static <T> Osgl.F2<T,T,Boolean> lessThanOrEqualsTo(Osgl.Func2<? super T,? super T,Integer> c)
lte(java.util.Comparator)T - The type of the value been compared, should implements Comparablec - The comparator that can compare the valuepublic static <T> Osgl.F2<T,T,Boolean> gte(Osgl.Func2<? super T,? super T,Integer> c)
Comparator specifiedT - The type of the value been compared, should implements Comparablec - The comparator that can compare the valuepublic static <T> Osgl.F2<T,T,Boolean> greaterThanOrEqualsTo(Osgl.Func2<? super T,? super T,Integer> c)
gte(java.util.Comparator)T - The type of the value been compared, should implements Comparablec - The comparator that can compare the valuepublic static <P1,P2> Osgl.F2<P1,P2,Boolean> eq()
EQP1 - the type of the first argumentP2 - the type of the second argumentpublic static <P1,P2> Osgl.F2<P1,P2,Boolean> equal()
eq()P1 - the type of the first argumentP2 - the type of the second argumentpublic static <P> Osgl.Predicate<P> eq(P element)
Osgl.Predicate that checkes if the argument
equals to the element specifiedP - the element typeelement - the object to be checked with argument when applying
the functiontrue if the argument equals
with the element specified or false otherwisepublic static <P1,P2> Osgl.F2<P1,P2,Boolean> ne()
NEP1 - type of the first argumentP2 - type of the second argumentNEpublic static <P1,P2> Osgl.F2<P1,P2,Boolean> notEqual()
ne()P1 - type of the first argumentP2 - type of the second argumentNEpublic static <T extends Comparable<T>> Osgl.Comparator<T> naturalOrder()
public static <T extends Comparable<? super T>> Osgl.Comparator<T> reverseOrder()
public static <T> Osgl.Comparator<T> reverse(Comparator<? super T> c)
public static <T,U extends Comparable<? super U>> Osgl.Comparator<T> comparing(Osgl.Function<? super T,? extends U> keyExtractor)
public static <T,U> Osgl.Comparator<T> comparing(Osgl.Function<? super T,? extends U> keyExtractor, Comparator<? super U> keyComparator)
Comparator with a function to extract the key of type U from given object of type T and
a comparator to compare type UT - the type of the object instanceU - the type of the key extract from TkeyExtractor - the function to extract the key for comparisonkeyComparator - the Comparator that compares type U (the key type)public static <T> Osgl.F1<T,Integer> hc()
HASH_CODET - specifies the generic type of the argument passed to the returned functionF1<T, Integer> that takes type T argument and
returns Object.hashCode() of the argumentpublic static <T> Osgl.F1<T,String> asString()
AS_STRING. It returns a function
that takes argument of type T and returns a String by calling
Object.toString() function on the argumentT - the generic type T of the returning functionF1<T, String>public static <T> Osgl.F1<T,String> asString(Class<T> tClass)
AS_STRING. It returns a function that
takes argument of type T and returns a String by calling
Object.toString() function on the argumentT - the generic type T of the returning functiontClass - the class specify the generic typeF1<T, String>public static <BEAN> Osgl.Transformer<BEAN,Object> propertyExtractor(String property)
public static Osgl.Predicate<Field> fieldWithAnnotation(Class<? extends Annotation> annoClass)
Field type
object, returns `true` if the field has specified annotation presentedannoClass - the annotationCopyright © 2017. All Rights Reserved.