| Package | Description |
|---|---|
| org.osgl | |
| org.osgl.util |
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Osgl.Bijection<X,Y>
|
static interface |
Osgl.Func1<P1,R>
Alias of
Osgl.Function |
static interface |
Osgl.MultiplicableFunction<P1,R>
A
Osgl.Function function that support Osgl.MultiplicableFunction.times(int) operation |
| Modifier and Type | Class and Description |
|---|---|
static class |
Osgl.F1<P1,R>
Base implementation of
Osgl.Function function. |
static class |
Osgl.Operator<T> |
static class |
Osgl.Predicate<T>
Predicate is a predefined Function<Boolean, T> typed
function with a set of utilities dealing with boolean operations. |
static class |
Osgl.Processor<T>
Define a processor function which applied to one parameter and return the parameter instance after
processing on the parameter
|
static class |
Osgl.Transformer<FROM,TO>
A Transformer is literally a kind of
Osgl.F1 function |
static class |
Osgl.V1<P1> |
static class |
Osgl.Visitor<T>
Define a visitor (known as Consumer in java 8) function which applied to one parameter and without return type
|
| Modifier and Type | Method and Description |
|---|---|
Osgl.Var<T> |
Osgl.Var.accept(Osgl.Function<? super T,?> visitor) |
Osgl.Var<T> |
Osgl.Var.acceptLeft(Osgl.Function<? super T,?> visitor) |
C.List<T> |
Osgl.Var.acceptRight(Osgl.Function<? super T,?> visitor) |
boolean |
Osgl.Var.allMatch(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Predicate<T> |
Osgl.Predicate.and(Osgl.Function<? super T,Boolean>... predicates)
Return an
Predicate predicate from a list of Function<Boolean, T>
with AND operation. |
static <T> Osgl.Predicate<T> |
Osgl.F.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 |
Osgl.F1<P1,R> |
Osgl.F1.andThen(Osgl.Function<? super P1,? extends R>... afters)
Returns a composed function that applied, in sequence, this function and
all functions specified one by one.
|
<T> Osgl.F0<T> |
Osgl.F0.andThen(Osgl.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. |
<T> Osgl.F1<P1,T> |
Osgl.F1.andThen(Osgl.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. |
<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.
|
<T> Osgl.Func3<P1,P2,P3,T> |
Osgl.F3.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.
|
<T> Osgl.F4<P1,P2,P3,P4,T> |
Osgl.F4.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.
|
<T> Osgl.F5<P1,P2,P3,P4,P5,T> |
Osgl.F5.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 <T> Osgl.Predicate<T> |
Osgl.F.any(Osgl.Function<? super T,Boolean>... predicates)
Alias of
Osgl.F.or(Osgl.Function[]) |
boolean |
Osgl.Var.anyMatch(Osgl.Function<? super T,Boolean> predicate) |
static <T> Osgl.F1<T,Void> |
Osgl.F.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> |
Osgl.F.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>> |
Osgl.F.comparing(Osgl.Function<? super T,? extends U> keyExtractor) |
static <T,U> Osgl.Comparator<T> |
Osgl.F.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 |
<X1> Osgl.F1<X1,R> |
Osgl.F1.compose(Osgl.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 |
C.List<T> |
Osgl.Var.dropWhile(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Var<T> |
Osgl.Var.each(Osgl.Function<? super T,?> visitor) |
<R> Osgl.F1<T,Osgl.Option<R>> |
Osgl.Predicate.elseThen(Osgl.Function<? super T,R> func) |
static <P1,R> Osgl.F1<P1,R> |
Osgl.f1(Osgl.Function<? super P1,? extends R> f1)
Convert a general
Osgl.Function function into a Osgl.F1 typed
function |
static List<Field> |
Osgl.fieldsOf(Class<?> c,
Class<?> rootClass,
Osgl.Function<Field,Boolean> filter)
Returns all fields of a class and all super classes until root class.
|
static List<Field> |
Osgl.fieldsOf(Class<?> c,
Osgl.Function<Class<?>,Boolean> classFilter,
Osgl.Function<Field,Boolean> fieldFilter) |
static List<Field> |
Osgl.fieldsOf(Class<?> c,
Osgl.Function<Class<?>,Boolean> classFilter,
Osgl.Function<Field,Boolean> fieldFilter) |
static List<Field> |
Osgl.fieldsOf(Class<?> c,
Osgl.Function<Field,Boolean> filter)
Returns all fields of a class and all super classes.
|
Osgl.Option<T> |
Osgl.Option.filter(Osgl.Function<? super T,Boolean> predicate)
If a value is present, and the value matches the given predicate,
return an
Option describing the value, otherwise return
Osgl.NONE. |
Osgl.F0<Osgl.Option<T>> |
Osgl.Option.f.filter(Osgl.Function<? super T,Boolean> predicate)
Returns a function that when applied, run
Osgl.Option.filter(Osgl.Function) on this
Option |
C.ListOrSet<T> |
Osgl.Var.filter(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Option<T> |
Osgl.Var.findFirst(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Option<T> |
Osgl.Var.findLast(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Option<T> |
Osgl.Var.findOne(Osgl.Function<? super T,Boolean> predicate) |
<R> C.List<R> |
Osgl.Var.flatMap(Osgl.Function<? super T,? extends Iterable<? extends R>> mapper) |
<B> Osgl.Option<B> |
Osgl.Option.flatMap(Osgl.Function<? super T,Osgl.Option<B>> mapper)
If a value is present, apply the provided
Option-bearing
mapping function to it, return that result, otherwise return
Osgl.NONE. |
<B> Osgl.F0<Osgl.Option<B>> |
Osgl.Option.f.flatMap(Osgl.Function<? super T,Osgl.Option<B>> mapper)
Returns a function that when applied, run
Osgl.Option.flatMap(Osgl.Function) on this
Option |
Osgl.Var<T> |
Osgl.Var.forEach(Osgl.Function<? super T,?> visitor) |
protected void |
Osgl.Var.forEachLeft(Osgl.Function<? super T,?> visitor) |
protected void |
Osgl.Var.forEachRight(Osgl.Function<? super T,?> visitor) |
static <T> Osgl.Predicate<T> |
Osgl.generalPredicate(Osgl.Function<? super T,?> f)
Convert a general
Function<T, ?> typed function to
Predicate<T> function. |
static <T> Osgl.Visitor<T> |
Osgl.guardedVisitor(Osgl.Function<? super T,Boolean> predicate,
Osgl.Function<? super T,?> visitor)
Return a composed visitor function that only applies when the guard predicate test returns
true |
static <T> Osgl.Visitor<T> |
Osgl.guardedVisitor(Osgl.Function<? super T,Boolean> predicate,
Osgl.Function<? super T,?> visitor)
Return a composed visitor function that only applies when the guard predicate test returns
true |
<R> Osgl.F1<T,Osgl.Option<R>> |
Osgl.Predicate.ifThen(Osgl.Function<? super T,R> func) |
static <K,T> Osgl.IndexedVisitor<K,T> |
Osgl.indexGuardedVisitor(Osgl.Function<? super K,Boolean> guard,
Osgl.Visitor<? super T> visitor) |
C.List.Cursor<T> |
Osgl.Var.locate(Osgl.Function<T,Boolean> predicate) |
C.List.Cursor<T> |
Osgl.Var.locateFirst(Osgl.Function<T,Boolean> predicate) |
C.List.Cursor<T> |
Osgl.Var.locateLast(Osgl.Function<T,Boolean> predicate) |
<B> Osgl.Option<B> |
Osgl.Option.map(Osgl.Function<? super T,? extends B> mapper)
If a value is present, apply the provided mapping function to it,
and if the result is non-null, return an
Option describing
the result. |
<B> Osgl.F0<Osgl.Option<B>> |
Osgl.Option.f.map(Osgl.Function<? super T,? extends B> mapper)
Returns a function that when applied, run
Osgl.Option.map(Osgl.Function) on this
Option |
<R> C.ListOrSet<R> |
Osgl.Var.map(Osgl.Function<? super T,? extends R> mapper) |
<R> Osgl.F1<R,Osgl.Var<T>> |
Osgl.Var._f.mapper(Osgl.Function<R,T> mapper) |
static <T> Osgl.Predicate<T> |
Osgl.F.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> |
Osgl.Predicate.negate(Osgl.Function<T,Boolean> predicate) |
static <T> Osgl.Predicate<T> |
Osgl.F.none(Osgl.Function<? super T,Boolean>... predicates)
Negation of
Osgl.F.or(Osgl.Function[]) |
boolean |
Osgl.Var.noneMatch(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Predicate<T> |
Osgl.Predicate.or(Osgl.Function<? super T,Boolean>... predicates)
Return an
Predicate predicate from a list of Function<Boolean, T>
with OR operation. |
static <T> Osgl.Predicate<T> |
Osgl.F.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 |
Osgl.F1<P1,R> |
Osgl.F1.orElse(Osgl.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. |
static <T> Osgl.Predicate<T> |
Osgl.predicate(Osgl.Function<? super T,Boolean> f)
Convert a
Function<T, Boolean> typed function to
Predicate<T> function. |
Osgl.Conf |
Osgl.Conf.registerBoolTester(Osgl.Function<Object,Boolean> tester)
Register a boolean tester.
|
C.List<T> |
Osgl.Var.remove(Osgl.Function<? super T,Boolean> predicate) |
void |
Osgl.Option.runWith(Osgl.Function<? super T,?> consumer) |
Osgl.F0<Void> |
Osgl.Option.f.runWith(Osgl.Function<? super T,?> consumer)
Returns a function that when applied, run
Osgl.Option.runWith(Osgl.Function)
on this Option |
C.List<T> |
Osgl.Var.takeWhile(Osgl.Function<? super T,Boolean> predicate) |
<U extends Comparable<? super U>> |
Osgl.Comparator.thenComparing(Osgl.Function<? super T,? extends U> keyExtractor)
See Java 8 doc
|
<U extends Comparable<? super U>> |
Osgl.Comparator.thenComparing(Osgl.Function<? super T,? extends U> keyExtractor,
Comparator<? super U> keyComparator)
See Java 8 doc
|
static <T> T |
Osgl.times(Osgl.Function<T,T> func,
T initVal,
int n) |
Osgl.Var<T> |
Osgl.Var.update(Osgl.Function<T,T> changer) |
Osgl.F1<T,Osgl.Var<T>> |
Osgl.Var._f.updater(Osgl.Function<T,T> changer) |
static <T> Osgl.Visitor<T> |
Osgl.visitor(Osgl.Function<? super T,?> f)
Convert a
Function<? super T, Void> function into a Osgl.Visitor |
| Modifier and Type | Method and Description |
|---|---|
static <T> Osgl.Predicate<T> |
Osgl.F.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> |
Osgl.F.any(Collection<Osgl.Function<? super T,Boolean>> predicates)
Alias of
Osgl.F.or(Collection) |
static <T> Osgl.Predicate<T> |
Osgl.F.none(Collection<Osgl.Function<? super T,Boolean>> predicates)
Negation of
Osgl.F.or(Collection) |
static <T> Osgl.Predicate<T> |
Osgl.F.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 |
| 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 Osgl.Function<File,InputStream> |
IO.F.FILE_TO_IS |
static Osgl.Function |
IO.F.PRINT |
static Osgl.Function |
IO.F.PRINTLN |
| Modifier and Type | Method and Description |
|---|---|
static <T> Osgl.Function<?,T> |
IO.F.print() |
static <T> Osgl.Function<T,?> |
IO.F.print(String prefix,
String suffix) |
static <T> Osgl.Function<T,?> |
IO.F.print(String prefix,
String suffix,
PrintStream ps) |
static <T> Osgl.Function<?,T> |
IO.F.println() |
| Modifier and Type | Method and Description |
|---|---|
T |
StrBase.accept(Osgl.Function<? super Character,?> visitor) |
C.Range<ELEMENT> |
C.Range.accept(Osgl.Function<? super ELEMENT,?> visitor)
Iterate this
Traversable with a visitor function. |
LazyRange<ELEMENT> |
LazyRange.accept(Osgl.Function<? super ELEMENT,?> visitor) |
C.Traversable<T> |
C.Traversable.accept(Osgl.Function<? super T,?> visitor)
Iterate this
Traversable with a visitor function. |
C.Sequence<T> |
C.Sequence.accept(Osgl.Function<? super T,?> visitor) |
C.ReversibleSequence<T> |
C.ReversibleSequence.accept(Osgl.Function<? super T,?> visitor) |
C.List<T> |
C.List.accept(Osgl.Function<? super T,?> visitor) |
C.Set<T> |
C.Set.accept(Osgl.Function<? super T,?> visitor) |
C.ListOrSet<T> |
C.ListOrSet.accept(Osgl.Function<? super T,?> visitor) |
C.List<T> |
ListBase.accept(Osgl.Function<? super T,?> visitor) |
SetBase<T> |
SetBase.accept(Osgl.Function<? super T,?> visitor) |
SequenceBase<T> |
SequenceBase.accept(Osgl.Function<? super T,?> visitor) |
C.Traversable<T> |
TraversableBase.accept(Osgl.Function<? super T,?> visitor) |
T |
StrBase.acceptLeft(Osgl.Function<? super Character,?> visitor) |
C.Range<ELEMENT> |
C.Range.acceptLeft(Osgl.Function<? super ELEMENT,?> visitor)
Iterate through this sequence from head to tail with
the visitor function specified
|
LazyRange<ELEMENT> |
LazyRange.acceptLeft(Osgl.Function<? super ELEMENT,?> visitor) |
C.Sequence<T> |
C.Sequence.acceptLeft(Osgl.Function<? super T,?> visitor)
Iterate through this sequence from head to tail with
the visitor function specified
|
C.ReversibleSequence<T> |
C.ReversibleSequence.acceptLeft(Osgl.Function<? super T,?> visitor) |
C.List<T> |
C.List.acceptLeft(Osgl.Function<? super T,?> visitor) |
C.List<T> |
ListBase.acceptLeft(Osgl.Function<? super T,?> visitor) |
C.Sequence<T> |
SequenceBase.acceptLeft(Osgl.Function<? super T,?> visitor) |
T |
StrBase.acceptRight(Osgl.Function<? super Character,?> visitor) |
C.Range<ELEMENT> |
C.Range.acceptRight(Osgl.Function<? super ELEMENT,?> visitor)
iterate through the range from tail to head
|
LazyRange<ELEMENT> |
LazyRange.acceptRight(Osgl.Function<? super ELEMENT,?> visitor) |
C.ReversibleSequence<T> |
C.ReversibleSequence.acceptRight(Osgl.Function<? super T,?> visitor)
Iterate through this sequence from tail to head with the visitor function
specified
|
C.List<T> |
C.List.acceptRight(Osgl.Function<? super T,?> visitor) |
C.List<T> |
ListBase.acceptRight(Osgl.Function<? super T,?> visitor) |
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) |
boolean |
C.Traversable.allMatch(Osgl.Function<? super T,Boolean> predicate)
Check if all elements match the predicate specified
|
boolean |
ListBase.allMatch(Osgl.Function<? super T,Boolean> predicate) |
boolean |
SetBase.allMatch(Osgl.Function<? super T,Boolean> predicate) |
boolean |
TraversableBase.allMatch(Osgl.Function<? super T,Boolean> predicate) |
boolean |
C.Traversable.anyMatch(Osgl.Function<? super T,Boolean> predicate)
Check if any elements matches the predicate specified
|
boolean |
ListBase.anyMatch(Osgl.Function<? super T,Boolean> predicate) |
boolean |
SetBase.anyMatch(Osgl.Function<? super T,Boolean> predicate) |
boolean |
TraversableBase.anyMatch(Osgl.Function<? super T,Boolean> predicate) |
FastStr |
FastStr.dropWhile(Osgl.Function<? super Character,Boolean> predicate) |
Str |
Str.dropWhile(Osgl.Function<? super Character,Boolean> predicate) |
abstract T |
StrBase.dropWhile(Osgl.Function<? super Character,Boolean> predicate)
Return a str that without the first N characters in the string.
|
C.Sequence<T> |
C.Sequence.dropWhile(Osgl.Function<? super T,Boolean> predicate)
Returns a
Sequence consisting of the elements from this sequence with leading elements
dropped until the predicate returns true |
C.ReversibleSequence<T> |
C.ReversibleSequence.dropWhile(Osgl.Function<? super T,Boolean> predicate) |
C.List<T> |
C.List.dropWhile(Osgl.Function<? super T,Boolean> predicate)
Returns a
Sequence consisting of the elements from this sequence with leading elements
dropped until the predicate returns true |
C.List<T> |
ListBase.dropWhile(Osgl.Function<? super T,Boolean> predicate) |
C.Sequence<T> |
SequenceBase.dropWhile(Osgl.Function<? super T,Boolean> predicate) |
C.Range<ELEMENT> |
C.Range.each(Osgl.Function<? super ELEMENT,?> visitor) |
LazyRange<ELEMENT> |
LazyRange.each(Osgl.Function<? super ELEMENT,?> visitor) |
C.Traversable<T> |
C.Traversable.each(Osgl.Function<? super T,?> visitor)
Alias of
C.Traversable.accept(Osgl.Function) |
C.Sequence<T> |
C.Sequence.each(Osgl.Function<? super T,?> visitor) |
C.ReversibleSequence<T> |
C.ReversibleSequence.each(Osgl.Function<? super T,?> visitor) |
C.List<T> |
C.List.each(Osgl.Function<? super T,?> visitor) |
C.Set<T> |
C.Set.each(Osgl.Function<? super T,?> visitor) |
C.ListOrSet<T> |
C.ListOrSet.each(Osgl.Function<? super T,?> visitor) |
C.List<T> |
ListBase.each(Osgl.Function<? super T,?> visitor) |
SetBase<T> |
SetBase.each(Osgl.Function<? super T,?> visitor) |
C.Sequence<T> |
SequenceBase.each(Osgl.Function<? super T,?> visitor) |
C.Traversable<T> |
TraversableBase.each(Osgl.Function<? super T,?> visitor) |
static <T> C.Sequence<T> |
C.filter(C.Sequence<T> seq,
Osgl.Function<? super T,Boolean> predicate) |
static <T> Iterator<T> |
Iterators.filter(Iterator<? extends T> itr,
Osgl.Function<? super T,Boolean> predicate) |
T |
StrBase.filter(Osgl.Function<? super Character,Boolean> predicate) |
C.Traversable<T> |
C.Traversable.filter(Osgl.Function<? super T,Boolean> predicate)
Returns an new traversable that contains all elements in the current traversable
except that does not pass the test of the filter function specified.
|
C.Sequence<T> |
C.Sequence.filter(Osgl.Function<? super T,Boolean> predicate)
Returns an new traversable that contains all elements in the current traversable
except that does not pass the test of the filter function specified.
|
C.ReversibleSequence<T> |
C.ReversibleSequence.filter(Osgl.Function<? super T,Boolean> predicate) |
C.List<T> |
C.List.filter(Osgl.Function<? super T,Boolean> predicate) |
C.Set<T> |
C.Set.filter(Osgl.Function<? super T,Boolean> predicate) |
C.ListOrSet<T> |
C.ListOrSet.filter(Osgl.Function<? super T,Boolean> predicate) |
C.List<T> |
ListBase.filter(Osgl.Function<? super T,Boolean> predicate) |
C.Set<T> |
SetBase.filter(Osgl.Function<? super T,Boolean> predicate) |
C.Sequence<T> |
SequenceBase.filter(Osgl.Function<? super T,Boolean> predicate) |
C.Traversable<T> |
TraversableBase.filter(Osgl.Function<? super T,Boolean> predicate) |
static <T> Iterator<T> |
Iterators.filterIndex(Iterator<? extends T> itr,
Osgl.Function<Integer,Boolean> predicate) |
static <T> Iterator<T> |
Iterators.filterUntil(Iterator<? extends T> itr,
Osgl.Function<? super T,Boolean> predicate) |
static <T> Iterator<T> |
Iterators.filterWhile(Iterator<? extends T> itr,
Osgl.Function<? super T,Boolean> predicate) |
Osgl.Option<T> |
C.Sequence.findFirst(Osgl.Function<? super T,Boolean> predicate)
Apply the predicate specified to the element of this sequence
from head to tail.
|
Osgl.Option<T> |
ListBase.findFirst(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Option<T> |
SequenceBase.findFirst(Osgl.Function<? super T,Boolean> predicate)
Delegate to
TraversableBase.findOne(org.osgl.Osgl.Function) |
Osgl.Option<ELEMENT> |
C.Range.findLast(Osgl.Function<? super ELEMENT,Boolean> predicate) |
Osgl.Option<ELEMENT> |
LazyRange.findLast(Osgl.Function<? super ELEMENT,Boolean> predicate) |
Osgl.Option<T> |
C.ReversibleSequence.findLast(Osgl.Function<? super T,Boolean> predicate)
Apply the predicate specified to the element of this sequence
from tail to head.
|
Osgl.Option<T> |
ListBase.findLast(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Option<T> |
C.Traversable.findOne(Osgl.Function<? super T,Boolean> predicate)
Returns an element that matches the predicate specified.
|
Osgl.Option<T> |
ListBase.findOne(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Option<T> |
SetBase.findOne(Osgl.Function<? super T,Boolean> predicate) |
Osgl.Option<T> |
TraversableBase.findOne(Osgl.Function<? super T,Boolean> predicate)
Iterate the traversal to check if any element applied to the predicate
the iteration process stop when the element is found and return
an option describing the element.
|
static <T,R> Iterator<R> |
Iterators.flatMap(Iterator<? extends T> itr,
Osgl.Function<? super T,? extends Iterable<? extends R>> mapper) |
<R> C.List<R> |
StrBase.flatMap(Osgl.Function<? super Character,? extends Iterable<? extends R>> mapper) |
<R> C.Traversable<R> |
C.Traversable.flatMap(Osgl.Function<? super T,? extends Iterable<? extends R>> mapper)
Returns a traversable consisting of the results of replacing each element of this
stream with the contents of the iterable produced by applying the provided mapping
function to each element.
|
<R> C.Sequence<R> |
C.Sequence.flatMap(Osgl.Function<? super T,? extends Iterable<? extends R>> mapper)
Returns a traversable consisting of the results of replacing each element of this
stream with the contents of the iterable produced by applying the provided mapping
function to each element.
|
<R> C.ReversibleSequence<R> |
C.ReversibleSequence.flatMap(Osgl.Function<? super T,? extends Iterable<? extends R>> mapper)
Returns a traversable consisting of the results of replacing each element of this
stream with the contents of the iterable produced by applying the provided mapping
function to each element.
|
<R> C.List<R> |
C.List.flatMap(Osgl.Function<? super T,? extends Iterable<? extends R>> mapper)
Returns a traversable consisting of the results of replacing each element of this
stream with the contents of the iterable produced by applying the provided mapping
function to each element.
|
<R> C.List<R> |
ListBase.flatMap(Osgl.Function<? super T,? extends Iterable<? extends R>> mapper) |
<R> C.Set<R> |
SetBase.flatMap(Osgl.Function<? super T,? extends Iterable<? extends R>> mapper) |
<R> C.Sequence<R> |
SequenceBase.flatMap(Osgl.Function<? super T,? extends Iterable<? extends R>> mapper) |
<R> C.Traversable<R> |
TraversableBase.flatMap(Osgl.Function<? super T,? extends Iterable<? extends R>> mapper) |
static <T> void |
C.forEach(Iterable<? extends T> iterable,
Osgl.Function<? super T,?> visitor)
Run visitor function on each element supplied by the iterable.
|
static <T> void |
C.forEach(Iterator<? extends T> iterator,
Osgl.Function<? super T,?> visitor)
Run visitor function on each element supplied by the iterator.
|
C.Range<ELEMENT> |
C.Range.forEach(Osgl.Function<? super ELEMENT,?> visitor) |
LazyRange<ELEMENT> |
LazyRange.forEach(Osgl.Function<? super ELEMENT,?> visitor) |
C.Traversable<T> |
C.Traversable.forEach(Osgl.Function<? super T,?> visitor)
Alias of
C.Traversable.accept(Osgl.Function) |
C.Sequence<T> |
C.Sequence.forEach(Osgl.Function<? super T,?> visitor) |
C.ReversibleSequence<T> |
C.ReversibleSequence.forEach(Osgl.Function<? super T,?> visitor) |
C.List<T> |
C.List.forEach(Osgl.Function<? super T,?> visitor) |
C.Set<T> |
C.Set.forEach(Osgl.Function<? super T,?> visitor) |
C.ListOrSet<T> |
C.ListOrSet.forEach(Osgl.Function<? super T,?> visitor) |
C.List<T> |
ListBase.forEach(Osgl.Function<? super T,?> visitor) |
SetBase<T> |
SetBase.forEach(Osgl.Function<? super T,?> visitor)
Sub class could override this method to implement iterating in parallel.
|
SequenceBase<T> |
SequenceBase.forEach(Osgl.Function<? super T,?> visitor) |
TraversableBase<T> |
TraversableBase.forEach(Osgl.Function<? super T,?> visitor)
Iterate through this traversal and apply the visitor function specified
to each element iterated
|
static <T> Osgl.F1<Iterable<? extends T>,Void> |
C.F.forEachIterable(Osgl.Function<? super T,?> visitor)
Returns a function that apply the visitor function specified on the argument (iterable)
|
protected void |
ListBase.forEachLeft(Osgl.Function<? super T,?> visitor) |
protected void |
SequenceBase.forEachLeft(Osgl.Function<? super T,?> visitor) |
protected void |
ListBase.forEachRight(Osgl.Function<? super T,?> visitor) |
C.List.Cursor<T> |
C.List.locate(Osgl.Function<T,Boolean> predicate)
Locate any one element in the list that matches the predicate.
|
C.List.Cursor<T> |
ListBase.locate(Osgl.Function<T,Boolean> predicate) |
C.List.Cursor<T> |
C.List.locateFirst(Osgl.Function<T,Boolean> predicate)
Find the first element in this list that matches the predicate.
|
C.List.Cursor<T> |
ListBase.locateFirst(Osgl.Function<T,Boolean> predicate) |
C.List.Cursor<T> |
C.List.locateLast(Osgl.Function<T,Boolean> predicate)
Locate the first element in this list that matches the predicate.
|
C.List.Cursor<T> |
ListBase.locateLast(Osgl.Function<T,Boolean> predicate) |
static <T,R> C.ReversibleSequence<R> |
C.map(C.ReversibleSequence<T> seq,
Osgl.Function<? super T,? extends R> mapper) |
static <T,R> C.Sequence<R> |
C.map(C.Sequence<T> seq,
Osgl.Function<? super T,? extends R> mapper) |
static <T,R> Iterator<R> |
Iterators.map(Iterator<? extends T> itr,
Osgl.Function<? super T,? extends R> mapper) |
<R> C.List<R> |
StrBase.map(Osgl.Function<? super Character,? extends R> mapper) |
<R> C.Traversable<R> |
C.Traversable.map(Osgl.Function<? super T,? extends R> mapper)
Returns an new traversable with a mapper function specified.
|
<R> C.Sequence<R> |
C.Sequence.map(Osgl.Function<? super T,? extends R> mapper)
Returns an new traversable with a mapper function specified.
|
<R> C.ReversibleSequence<R> |
C.ReversibleSequence.map(Osgl.Function<? super T,? extends R> mapper) |
<R> C.List<R> |
C.List.map(Osgl.Function<? super T,? extends R> mapper) |
<R> C.ListOrSet<R> |
C.ListOrSet.map(Osgl.Function<? super T,? extends R> mapper) |
<R> C.List<R> |
ListBase.map(Osgl.Function<? super T,? extends R> mapper) |
<R> C.Set<R> |
SetBase.map(Osgl.Function<? super T,? extends R> mapper) |
<R> C.Sequence<R> |
SequenceBase.map(Osgl.Function<? super T,? extends R> mapper) |
<R> C.Traversable<R> |
TraversableBase.map(Osgl.Function<? super T,? extends R> mapper) |
boolean |
C.Traversable.noneMatch(Osgl.Function<? super T,Boolean> predicate)
Check if no elements matches the predicate specified.
|
boolean |
ListBase.noneMatch(Osgl.Function<? super T,Boolean> predicate) |
boolean |
SetBase.noneMatch(Osgl.Function<? super T,Boolean> predicate) |
boolean |
TraversableBase.noneMatch(Osgl.Function<? super T,Boolean> predicate) |
FastStr |
FastStr.remove(Osgl.Function<? super Character,Boolean> predicate) |
Str |
Str.remove(Osgl.Function<? super Character,Boolean> predicate) |
abstract T |
StrBase.remove(Osgl.Function<? super Character,Boolean> predicate)
Returns a str that with all characters in this str instance except those matches the
test of predicate function specified
|
C.List<T> |
C.List.remove(Osgl.Function<? super T,Boolean> predicate)
For mutable list, remove all element that matches the predicate
specified from this List and return this list once done.
|
C.List<T> |
ListBase.remove(Osgl.Function<? super T,Boolean> predicate) |
void |
PropertyHandler.setObjectFactory(Osgl.Function<Class<?>,Object> factory) |
Osgl.T2<C.List<T>,C.List<T>> |
C.List.split(Osgl.Function<? super T,Boolean> predicate)
Split this list into two list based on the predicate specified.
|
Osgl.T2<C.List<T>,C.List<T>> |
ListBase.split(Osgl.Function<? super T,Boolean> predicate) |
FastStr |
FastStr.takeWhile(Osgl.Function<? super Character,Boolean> predicate) |
Str |
Str.takeWhile(Osgl.Function<? super Character,Boolean> predicate) |
abstract T |
StrBase.takeWhile(Osgl.Function<? super Character,Boolean> predicate)
Return a str that contains the first N characters in this string, the characters
in the new str must matches the test specified by the predicate function.
|
C.Sequence<T> |
C.Sequence.takeWhile(Osgl.Function<? super T,Boolean> predicate)
Returns an new
Sequence that takes the head of this Sequence until the predicate
evaluate to false: |
C.ReversibleSequence<T> |
C.ReversibleSequence.takeWhile(Osgl.Function<? super T,Boolean> predicate)
Returns an new
Sequence that takes the head of this Sequence until the predicate
evaluate to false: |
C.List<T> |
C.List.takeWhile(Osgl.Function<? super T,Boolean> predicate)
Returns an new
Sequence that takes the head of this Sequence until the predicate
evaluate to false: |
C.List<T> |
ListBase.takeWhile(Osgl.Function<? super T,Boolean> predicate) |
C.Sequence<T> |
SequenceBase.takeWhile(Osgl.Function<? super T,Boolean> predicate) |
static <T> StringValueResolver<T> |
StringValueResolver.wrap(Osgl.Function<String,T> func,
Class<T> targetType) |
Copyright © 2017. All Rights Reserved.