| Package | Description |
|---|---|
| org.osgl | |
| org.osgl.util |
| Modifier and Type | Class and Description |
|---|---|
static class |
Osgl.Comparator<T>
Adapt JDK Comparator (since 1.2) to Functional programming.
|
static class |
Osgl.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 |
Osgl.V2<P1,P2> |
| Modifier and Type | Field and Description |
|---|---|
static Osgl.F2 |
Osgl.F.EQ
A predefined function that applies to two parameters and check if they are equals to each other
|
static Osgl.F2 |
Osgl.F.EQUAL
Alias of
Osgl.F.EQ |
static Osgl.F2 |
Osgl.F2
A dumb
Osgl.Func2 implementation that does nothing and return null |
static Osgl.F2 |
Osgl.F.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 |
Osgl.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 Osgl.F2 |
Osgl.F.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 |
Osgl.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 Osgl.F2 |
Osgl.F.NE
A predefined function that applies to two parameters and check if they are not equals to
each other.
|
static Osgl.F2 |
Osgl.F.NOT_EQUAL
Alias of
Osgl.F.NE |
| Modifier and Type | Method and Description |
|---|---|
Osgl.F2<P1,P2,R> |
Osgl.F2.andThen(Osgl.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> Osgl.F2<P1,P2,T> |
Osgl.F2.andThen(Osgl.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> Osgl.F2<T1,T2,Void> |
Osgl.F.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> |
Osgl.F.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 |
<X1,X2> Osgl.F2<X1,X2,R> |
Osgl.F1.compose(Osgl.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 |
Osgl.F2<P1,P2,R> |
Osgl.F3.curry(P3 p3) |
Osgl.F2<P1,P2,R> |
Osgl.F4.curry(P3 p3,
P4 p4) |
Osgl.F2<P1,P2,R> |
Osgl.F5.curry(P3 p3,
P4 p4,
P5 p5) |
static <P1,P2> Osgl.F2<P1,P2,Boolean> |
Osgl.F.eq()
The type-safe version of
Osgl.F.EQ |
static <P1,P2> Osgl.F2<P1,P2,Boolean> |
Osgl.F.equal()
Alias of
Osgl.F.eq() |
static <P1,P2,R> Osgl.F2<P1,P2,R> |
Osgl.f2()
The type-safe version of
Osgl.F2 |
static <P1,P2,R> Osgl.F2<P1,P2,R> |
Osgl.f2(Osgl.Func2<? super P1,? super P2,? extends R> f2)
Convert a general
Osgl.Func2 function into a Osgl.F2 typed
function |
static <T extends Comparable<T>> |
Osgl.F.greaterThan()
Alias of
Osgl.F.gt() |
static <T> Osgl.F2<T,T,Boolean> |
Osgl.F.greaterThan(Comparator<? super T> c)
Alias of
Osgl.F.gt(java.util.Comparator) |
static <T> Osgl.F2<T,T,Boolean> |
Osgl.F.greaterThan(Osgl.Func2<? super T,? super T,Integer> c)
Alias of
Osgl.F.gt(java.util.Comparator) |
static <T extends Comparable<T>> |
Osgl.F.greaterThanOrEqualsTo()
Alias of
Osgl.F.gte() |
static <T> Osgl.F2<T,T,Boolean> |
Osgl.F.greaterThanOrEqualsTo(Comparator<? super T> c)
Alias of
Osgl.F.gte(java.util.Comparator) |
static <T> Osgl.F2<T,T,Boolean> |
Osgl.F.greaterThanOrEqualsTo(Osgl.Func2<? super T,? super T,Integer> c)
Alias of
Osgl.F.gte(java.util.Comparator) |
static <T extends Comparable<T>> |
Osgl.F.gt()
Returns a function that check if a value is less than another one.
|
static <T> Osgl.F2<T,T,Boolean> |
Osgl.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> Osgl.F2<T,T,Boolean> |
Osgl.F.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>> |
Osgl.F.gte()
Returns a function that check if a value is greater than or equals to another one.
|
static <T> Osgl.F2<T,T,Boolean> |
Osgl.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> Osgl.F2<T,T,Boolean> |
Osgl.F.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>> |
Osgl.F.lessThan()
Alias of
Osgl.F.lt() |
static <T> Osgl.F2<T,T,Boolean> |
Osgl.F.lessThan(Comparator<? super T> c)
Alias of
Osgl.F.lt(java.util.Comparator) |
static <T> Osgl.F2<T,T,Boolean> |
Osgl.F.lessThan(Osgl.Func2<? super T,? super T,Integer> c)
Alias of
Osgl.F.lt(java.util.Comparator) |
static <T extends Comparable<T>> |
Osgl.F.lessThanOrEqualsTo()
Alias of
Osgl.F.lte() |
static <T> Osgl.F2<T,T,Boolean> |
Osgl.F.lessThanOrEqualsTo(Comparator<? super T> c)
Alias of
Osgl.F.lte(java.util.Comparator) |
static <T> Osgl.F2<T,T,Boolean> |
Osgl.F.lessThanOrEqualsTo(Osgl.Func2<? super T,? super T,Integer> c)
Alias of
Osgl.F.lte(java.util.Comparator) |
Osgl.F2<P1,P2,Osgl.Option<R>> |
Osgl.F2.lift()
Turns this partial function into a plain function returning an Option result.
|
static <T extends Comparable<T>> |
Osgl.F.lt()
Returns a function that check if a value is less than another one.
|
static <T> Osgl.F2<T,T,Boolean> |
Osgl.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> Osgl.F2<T,T,Boolean> |
Osgl.F.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>> |
Osgl.F.lte()
Returns a function that check if a value is less than or equals to another one.
|
static <T> Osgl.F2<T,T,Boolean> |
Osgl.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> Osgl.F2<T,T,Boolean> |
Osgl.F.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 <P1,P2> Osgl.F2<P1,P2,Boolean> |
Osgl.F.ne()
The type-safe version of
Osgl.F.NE |
static <P1,P2> Osgl.F2<P1,P2,Boolean> |
Osgl.F.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> Osgl.F2<P1,P2,Boolean> |
Osgl.F.notEqual()
Alias of
Osgl.F.ne() |
Osgl.F2<P1,P2,R> |
Osgl.F2.orElse(Osgl.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 |
Osgl.F2.applyOrElse(P1 p1,
P2 p2,
Osgl.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 | 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 Osgl.F2<String,String,Boolean> |
S.F.CONTAINS |
static Osgl.F2 |
N.F.COUNTER |
static Osgl.F2<Number,Number,Number> |
N.F.DIVIDE |
static Osgl.F2<String,String,Boolean> |
S.F.ENDS_WITH |
static Osgl.F2<String,Integer,String> |
S.F.FIRST |
static Osgl.F2<String,Integer,String> |
S.F.LAST |
static Osgl.F2<String,Integer,String> |
S.F.MAX_LENGTH |
static Osgl.F2<Number,Number,Number> |
N.F.MULTIPLY |
static Osgl.F2<String,String,Boolean> |
S.F.STARTS_WITH |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Number,X> |
N.F.adder(Osgl.Function<X,T> func) |
static <T extends Number,X> |
N.F.adder(Osgl.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> Osgl.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 © 2017. All Rights Reserved.