| Package | Description |
|---|---|
| org.osgl | |
| org.osgl.storage | |
| org.osgl.util |
| Modifier and Type | Class and Description |
|---|---|
static class |
Lang.Comparator<T>
Adapt JDK Comparator (since 1.2) to Functional programming.
|
static class |
Lang.IndexedVisitor<K,T>
An
IndexedVisitor provide a tool to iterate through a Map or indexed list
by passing the key/index and the value to the function. |
static class |
Lang.V2<P1,P2> |
| Modifier and Type | Field and Description |
|---|---|
static Lang.F2 |
Lang.F.EQ
A predefined function that applies to two parameters and check if they are equals to each other
|
static Lang.F2 |
Lang.F.EQUAL
Alias of
Lang.F.EQ |
static Lang.F2 |
Lang.F2
A dumb
Lang.Func2 implementation that does nothing and return null |
static Lang.F2 |
Lang.F.GREATER_THAN
A function that apply to two parameters then return
true if the first parameter is greater than the second one. |
static Lang.F2 |
Lang.F.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 Lang.F2 |
Lang.F.LESS_THAN
A function that apply to two parameters then return
true if the first parameter is less than the second one. |
static Lang.F2 |
Lang.F.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 Lang.F2 |
Lang.F.NE
A predefined function that applies to two parameters and check if they are not equals to each other.
|
static Lang.F2 |
Lang.F.NOT_EQUAL
Alias of
Lang.F.NE |
| Modifier and Type | Method and Description |
|---|---|
Lang.F2<P1,P2,R> |
Lang.F2.andThen(Lang.Func2<? super P1,? super P2,? extends R>... fs)
Returns a composed function that applied, in sequence, this function and all functions specified one by one.
|
<T> Lang.F2<P1,P2,T> |
Lang.F2.andThen(Lang.Function<? super R,? extends T> f)
Returns a composed function from this function and the specified function that takes the result of this function.
|
static <T1,T2> Lang.F2<T1,T2,Void> |
Lang.F.breakIf(Lang.Func2<? super T1,? super T2,Boolean> predicate)
Return a two variables function that throw out a
Lang.Break when a two variables predicate return true on an element been tested. |
static <P,T1,T2> Lang.F2<T1,T2,Void> |
Lang.F.breakIf(Lang.Func2<? super T1,? super T2,Boolean> predicate,
P payload)
Return a two variables function that throw out a
Lang.Break with payload specified when a two variables predicate return true on an element been tested |
<X1,X2> Lang.F2<X1,X2,R> |
Lang.F1.compose(Lang.Func2<? super X1,? super X2,? extends P1> before)
Returns an
F2<X1, X2, R>> function by composing the specified Func2<X1, X2, P1> function with this function applied last |
Lang.F2<P1,P2,R> |
Lang.F3.curry(P3 p3) |
Lang.F2<P1,P2,R> |
Lang.F4.curry(P3 p3,
P4 p4) |
Lang.F2<P1,P2,R> |
Lang.F5.curry(P3 p3,
P4 p4,
P5 p5) |
static <P1,P2> Lang.F2<P1,P2,Boolean> |
Lang.F.eq()
The type-safe version of
Lang.F.EQ |
static <P1,P2> Lang.F2<P1,P2,Boolean> |
Lang.F.equal()
Alias of
Lang.F.eq() |
static <P1,P2,R> Lang.F2<P1,P2,R> |
Lang.f2()
The type-safe version of
Lang.F2 |
static <P1,P2,R> Lang.F2<P1,P2,R> |
Lang.f2(Lang.Func2<? super P1,? super P2,? extends R> f2)
Convert a general
Lang.Func2 function into a Lang.F2 typed function |
static <T extends Comparable<T>> |
Lang.F.greaterThan()
Alias of
Lang.F.gt() |
static <T> Lang.F2<T,T,Boolean> |
Lang.F.greaterThan(Comparator<? super T> c)
Alias of
Lang.F.gt(java.util.Comparator) |
static <T> Lang.F2<T,T,Boolean> |
Lang.F.greaterThan(Lang.Func2<? super T,? super T,Integer> c)
Alias of
Lang.F.gt(java.util.Comparator) |
static <T extends Comparable<T>> |
Lang.F.greaterThanOrEqualsTo()
Alias of
Lang.F.gte() |
static <T> Lang.F2<T,T,Boolean> |
Lang.F.greaterThanOrEqualsTo(Comparator<? super T> c)
Alias of
Lang.F.gte(java.util.Comparator) |
static <T> Lang.F2<T,T,Boolean> |
Lang.F.greaterThanOrEqualsTo(Lang.Func2<? super T,? super T,Integer> c)
Alias of
Lang.F.gte(java.util.Comparator) |
static <T extends Comparable<T>> |
Lang.F.gt()
Returns a function that check if a value is less than another one.
|
static <T> Lang.F2<T,T,Boolean> |
Lang.F.gt(Comparator<? super T> c)
Returns a function that check if a value is less than another one using the
Comparator specified |
static <T> Lang.F2<T,T,Boolean> |
Lang.F.gt(Lang.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>> |
Lang.F.gte()
Returns a function that check if a value is greater than or equals to another one.
|
static <T> Lang.F2<T,T,Boolean> |
Lang.F.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> Lang.F2<T,T,Boolean> |
Lang.F.gte(Lang.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>> |
Lang.F.lessThan()
Alias of
Lang.F.lt() |
static <T> Lang.F2<T,T,Boolean> |
Lang.F.lessThan(Comparator<? super T> c)
Alias of
Lang.F.lt(java.util.Comparator) |
static <T> Lang.F2<T,T,Boolean> |
Lang.F.lessThan(Lang.Func2<? super T,? super T,Integer> c)
Alias of
Lang.F.lt(java.util.Comparator) |
static <T extends Comparable<T>> |
Lang.F.lessThanOrEqualsTo()
Alias of
Lang.F.lte() |
static <T> Lang.F2<T,T,Boolean> |
Lang.F.lessThanOrEqualsTo(Comparator<? super T> c)
Alias of
Lang.F.lte(java.util.Comparator) |
static <T> Lang.F2<T,T,Boolean> |
Lang.F.lessThanOrEqualsTo(Lang.Func2<? super T,? super T,Integer> c)
Alias of
Lang.F.lte(java.util.Comparator) |
Lang.F2<P1,P2,Lang.Option<R>> |
Lang.F2.lift()
Turns this partial function into a plain function returning an Option result.
|
static <T extends Comparable<T>> |
Lang.F.lt()
Returns a function that check if a value is less than another one.
|
static <T> Lang.F2<T,T,Boolean> |
Lang.F.lt(Comparator<? super T> c)
Returns a function that check if a value is less than another one using the
Comparator specified |
static <T> Lang.F2<T,T,Boolean> |
Lang.F.lt(Lang.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>> |
Lang.F.lte()
Returns a function that check if a value is less than or equals to another one.
|
static <T> Lang.F2<T,T,Boolean> |
Lang.F.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> Lang.F2<T,T,Boolean> |
Lang.F.lte(Lang.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 <P1,P2> Lang.F2<P1,P2,Boolean> |
Lang.F.ne()
The type-safe version of
Lang.F.NE |
static <P1,P2> Lang.F2<P1,P2,Boolean> |
Lang.F.negate(Lang.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> Lang.F2<P1,P2,Boolean> |
Lang.F.notEqual()
Alias of
Lang.F.ne() |
Lang.F2<P1,P2,R> |
Lang.F2.orElse(Lang.Func2<? super P1,? super P2,? 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. |
| Modifier and Type | Method and Description |
|---|---|
R |
Lang.F2.applyOrElse(P1 p1,
P2 p2,
Lang.F2<? super P1,? super P2,? extends R> fallback)
Applies this partial function to the given argument when it is contained in the function domain.
|
| Modifier and Type | Method and Description |
|---|---|
static Lang.F2<String,IStorageService,ISObject> |
IStorageService.f.get() |
static Lang.F2<String,IStorageService,Void> |
IStorageService.f.remove() |
| Modifier and Type | Class and Description |
|---|---|
static class |
N.ByteRangeStep |
static class |
N.IntRangeStep |
static class |
N.LongRangeStep |
static class |
N.RangeStep<T extends Number> |
static class |
N.ShortRangeStep |
class |
SimpleStringValueResolver |
| Modifier and Type | Field and Description |
|---|---|
static Lang.F2<String,String,Boolean> |
S.F.CONTAINS |
static Lang.F2 |
N.F.COUNTER |
static Lang.F2<Number,Number,Number> |
N.F.DIVIDE |
static Lang.F2<String,String,Boolean> |
S.F.ENDS_WITH |
static Lang.F2<String,Integer,String> |
S.F.FIRST |
static Lang.F2<String,Integer,String> |
S.F.LAST |
static Lang.F2<String,Integer,String> |
S.F.MAX_LENGTH |
static Lang.F2<Number,Number,Number> |
N.F.MULTIPLY |
static Lang.F2<String,String,Boolean> |
S.F.STARTS_WITH |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Number,X> |
N.F.adder(Lang.Function<X,T> func) |
static <T extends Number,X> |
N.F.adder(Lang.Function<X,T> func,
Class<T> clz) |
static <T extends Number> |
N.F.addTwo() |
static <T extends Number> |
N.F.addTwo(Class<T> c) |
static <T extends Number> |
N.F.aggregate(Class<T> clz) |
static <T> Lang.F2<Integer,T,Integer> |
N.F.counter() |
static <P1 extends Number,P2 extends Number,R extends Number> |
N.F.divide(Class<R> type) |
static <P1 extends Number,P2 extends Number,R extends Number> |
N.F.multiply(Class<R> type) |
static <T extends Number> |
N.F.subtract(Class<T> clz) |
Copyright © 2014–2021 OSGL (Open Source General Library). All rights reserved.