| Package | Description |
|---|---|
| org.osgl | |
| 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.F2<P1,P2,R>
Base implementation of
Lang.Func2 function. |
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 | 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.
|
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 |
static <T> Lang.Comparator<T> |
Lang.comparator(Lang.Func2<? super T,? super T,Integer> f)
Adapt a general
Lang.Func2 function with (T, T, Integer) type into Comparator |
<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 |
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> 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> 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> 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> 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> 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> Lang.F2<T,T,Boolean> |
Lang.F.lessThanOrEqualsTo(Lang.Func2<? super T,? super T,Integer> c)
Alias of
Lang.F.lte(java.util.Comparator) |
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> 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.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
|
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. |
Lang.Option<T> |
Lang.Var.reduce(Lang.Func2<T,T,T> accumulator) |
<R> R |
Lang.Var.reduce(R identity,
Lang.Func2<R,T,R> accumulator) |
Lang.Option<T> |
Lang.Var.reduceLeft(Lang.Func2<T,T,T> accumulator) |
<R> R |
Lang.Var.reduceLeft(R identity,
Lang.Func2<R,T,R> accumulator) |
Lang.Option<T> |
Lang.Var.reduceRight(Lang.Func2<T,T,T> accumulator) |
<R> R |
Lang.Var.reduceRight(R identity,
Lang.Func2<R,T,R> accumulator) |
Lang.F1<T,Lang.Var<T>> |
Lang.Var._f.updater(Lang.Func2<T,T,T> changer) |
| Modifier and Type | Class and Description |
|---|---|
static class |
N.ByteRangeStep |
static class |
N.Comparator |
static class |
N.IntRangeStep |
static class |
N.LongRangeStep |
static class |
N.Op |
static class |
N.RangeStep<T extends Number> |
static class |
N.ShortRangeStep |
class |
SimpleStringValueResolver |
| Modifier and Type | Method and Description |
|---|---|
Lang.Func2<ELEMENT,Integer,ELEMENT> |
C.Range.step()
Returns a
Lang.Func2 function that applied to an element in this Range and an integer n indicate the number of steps. |
Lang.Func2<ELEMENT,Integer,ELEMENT> |
LazyRange.step() |
| Modifier and Type | Method and Description |
|---|---|
Lang.Option<T> |
C.Traversable.reduce(Lang.Func2<T,T,T> accumulator)
Performs a reduction on the elements in this traversable, using provided accumulating function.
|
Lang.Option<T> |
C.Sequence.reduce(Lang.Func2<T,T,T> accumulator)
Performs a reduction on the elements in this traversable, using provided accumulating function.
|
Lang.Option<T> |
ListBase.reduce(Lang.Func2<T,T,T> accumulator) |
Lang.Option<T> |
TraversableBase.reduce(Lang.Func2<T,T,T> accumulator)
Iterate through the traversal to apply the accumulator to the result of previous application and the element being iterated.
|
Lang.Option<T> |
SetBase.reduce(Lang.Func2<T,T,T> accumulator) |
<R> R |
C.Traversable.reduce(R identity,
Lang.Func2<R,T,R> accumulator)
Performs a reduction on the elements in this traversable, using the provided identity and accumulating function.
|
<R> R |
C.Sequence.reduce(R identity,
Lang.Func2<R,T,R> accumulator)
Performs a reduction on the elements in this traversable, using the provided identity and accumulating function.
|
<R> R |
ListBase.reduce(R identity,
Lang.Func2<R,T,R> accumulator) |
<R> R |
TraversableBase.reduce(R identity,
Lang.Func2<R,T,R> accumulator)
Iterate through the traversal to apply the accumulator to the result of previous application and the element being iterated.
|
<R> R |
SetBase.reduce(R identity,
Lang.Func2<R,T,R> accumulator) |
Lang.Option<T> |
C.Sequence.reduceLeft(Lang.Func2<T,T,T> accumulator)
Run reduction from head to tail.
|
Lang.Option<T> |
ListBase.reduceLeft(Lang.Func2<T,T,T> accumulator) |
Lang.Option<T> |
SequenceBase.reduceLeft(Lang.Func2<T,T,T> accumulator)
Delegate to
TraversableBase.reduce(org.osgl.Lang.Func2) |
<R> R |
C.Sequence.reduceLeft(R identity,
Lang.Func2<R,T,R> accumulator)
Run reduction from header side.
|
<R> R |
ListBase.reduceLeft(R identity,
Lang.Func2<R,T,R> accumulator) |
<R> R |
SequenceBase.reduceLeft(R identity,
Lang.Func2<R,T,R> accumulator)
|
Lang.Option<ELEMENT> |
C.Range.reduceRight(Lang.Func2<ELEMENT,ELEMENT,ELEMENT> accumulator) |
Lang.Option<ELEMENT> |
LazyRange.reduceRight(Lang.Func2<ELEMENT,ELEMENT,ELEMENT> accumulator) |
Lang.Option<T> |
C.ReversibleSequence.reduceRight(Lang.Func2<T,T,T> accumulator)
Run reduction from tail to head.
|
Lang.Option<T> |
ListBase.reduceRight(Lang.Func2<T,T,T> accumulator) |
<R> R |
C.Range.reduceRight(R identity,
Lang.Func2<R,ELEMENT,R> accumulator) |
<R> R |
LazyRange.reduceRight(R identity,
Lang.Func2<R,ELEMENT,R> accumulator) |
<R> R |
C.ReversibleSequence.reduceRight(R identity,
Lang.Func2<R,T,R> accumulator)
Run reduction from tail side.
|
<R> R |
ListBase.reduceRight(R identity,
Lang.Func2<R,T,R> accumulator) |
void |
PropertyHandler.setStringValueResolver(Lang.Func2<String,Class<?>,?> stringValueResolver) |
Copyright © 2014–2021 OSGL (Open Source General Library). All rights reserved.