- accept(int, int) - Method in interface de.fhg.fokus.xtensions.range.IntIntConsumer
-
Method consuming the given two int
values a
and b
.
- and(Functions.Function1<? super T, Boolean>, Functions.Function1<? super T, Boolean>) - Static method in class de.fhg.fokus.xtensions.function.FunctionExtensions
-
This method composes two predicate functions (Functions returning a Boolean
value).
- andThen(Functions.Function0<? extends R>, Functions.Function1<? super R, ? extends V>) - Static method in class de.fhg.fokus.xtensions.function.FunctionExtensions
-
Returns a composed function that first calls before
function to and
then applies the after
function to the result.
- ArrayExtensions - Class in de.fhg.fokus.xtensions.iteration
-
Extension methods for object arrays.
- asDouble(OptionalInt) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
Returns OptionalDouble
that holds the value from self
casted to double
, or
an empty OptionalDouble
if self
is empty.
- asDouble(OptionalLong) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
Returns OptionalDouble
that holds the value from self
casted to double
, or
an empty OptionalDouble
if self
is empty.
- asDoubleIterable(double[]) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveArrayExtensions
-
This method creates an
IntIterable
for the given array
arr
,
allowing iteration over the complete array via a primitive iterator or a stream.
- asDoubleIterable(double[], int, int) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveArrayExtensions
-
This method provides an unmodifiable view as a
DoubleIterable
on a slice of the
array
arr
.
- asIntIterable(int[]) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveArrayExtensions
-
This method creates an
IntIterable
for the given array
arr
,
allowing iteration over all elements in the array via a primitive iterator or a stream.
- asIntIterable(int[], int, int) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveArrayExtensions
-
This method provides an unmodifiable view as a
IntIterable
on a slice of the
array
arr
.
- asIntIterable(IntegerRange) - Static method in class de.fhg.fokus.xtensions.range.RangeExtensions
-
Provides an
IntIterable
view on the given
IntegerRange r
.
- asIterable(OptionalDouble) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
Returns a DoubleIterable
that either provides the one value present in self
,
or an DoubleIterable
providing no value if self
is empty.
- asIterable(Optional<T>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
Returns an Iterable<T>
that either provides the one value present in
self
, or an Iterable<T>
providing no value if self
is
empty.
- asIterable(OptionalInt) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
Returns an IntIterable
that either provides the one value present in self
,
or an IntIterable
providing no value if self
is empty.
- asIterable(OptionalLong) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
Returns a LongIterable
that either provides the one value present in self
,
or an IntIterable
providing no value if self
is empty.
- asLong(OptionalInt) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
Returns OptionalLong
that holds the up-casted int value from self
, or
an empty OptionalLong
if self
is empty.
- asLongIterable(long[]) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveArrayExtensions
-
This method creates an
IntIterable
for the given array
arr
,
allowing iteration over the complete array via a primitive iterator or a stream.
- asLongIterable(long[], int, int) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveArrayExtensions
-
This method provides an unmodifiable view as a
LongIterable
on a slice of the
array
arr
.
- asMap() - Method in interface de.fhg.fokus.xtensions.iteration.ClassGroupingList
-
Returns map representation of this grouping.
- asMap() - Method in interface de.fhg.fokus.xtensions.iteration.ClassGroupingSet
-
Returns map representation of this grouping.
- asMap(Partition<X, X>) - Static method in interface de.fhg.fokus.xtensions.iteration.Partition
-
This extension method is wrapping a Partition
, having the same type for selected
and rejected part, into a Map<Boolean,X>
.
- asPair() - Method in interface de.fhg.fokus.xtensions.iteration.Partition
-
Returns the selected and rejected aggregations as a Pair
.
- asPartition(Map<Boolean, X>) - Static method in interface de.fhg.fokus.xtensions.iteration.Partition
-
This extension method is wrapping a Map<Boolean,X>
into a
Partition<X,X>
.
- AsyncCompute - Class in de.fhg.fokus.xtensions.concurrent
-
The static methods of this class start asynchronous computation, such as the asyncSupply
,
and asyncRun
methods.
- asyncRun(Procedures.Procedure1<? super CompletableFuture<?>>) - Static method in class de.fhg.fokus.xtensions.concurrent.AsyncCompute
-
- asyncRun(Executor, Procedures.Procedure1<? super CompletableFuture<?>>) - Static method in class de.fhg.fokus.xtensions.concurrent.AsyncCompute
-
This method will create a
CompletableFuture
and will run the given
runAsync
procedure
asynchronously, by calling it on the given
executor
, passing the created future to it.
- asyncRun(long, TimeUnit, Procedures.Procedure1<? super CompletableFuture<?>>) - Static method in class de.fhg.fokus.xtensions.concurrent.AsyncCompute
-
- asyncRun(Executor, long, TimeUnit, Procedures.Procedure1<? super CompletableFuture<?>>) - Static method in class de.fhg.fokus.xtensions.concurrent.AsyncCompute
-
This method will create a
CompletableFuture
and will run the given
runAsync
procedure
asynchronously, by calling it on the given
executor
, passing the created future to it.
- asyncRun(Executor, ScheduledExecutorService, long, TimeUnit, Procedures.Procedure1<? super CompletableFuture<?>>) - Static method in class de.fhg.fokus.xtensions.concurrent.AsyncCompute
-
This method will create a
CompletableFuture
and will run the given
runAsync
procedure
asynchronously, by calling it on the given
executor
, passing the created future to it.
- asyncSupply(Functions.Function1<? super CompletableFuture<?>, ? extends R>) - Static method in class de.fhg.fokus.xtensions.concurrent.AsyncCompute
-
This method will call the given
runAsync
function using the
common ForkJoinPool
passing
in a new
CompletableFuture
which is also being returned from this method.
- asyncSupply(Executor, Functions.Function1<? super CompletableFuture<?>, ? extends R>) - Static method in class de.fhg.fokus.xtensions.concurrent.AsyncCompute
-
This method will call the given runAsync
function using the provided executor
.
- asyncSupply(long, TimeUnit, Functions.Function1<? super CompletableFuture<?>, ? extends R>) - Static method in class de.fhg.fokus.xtensions.concurrent.AsyncCompute
-
This method will call the given
runAsync
function using the
common ForkJoinPool
with the
CompletableFuture
being returned.
- asyncSupply(ScheduledExecutorService, long, TimeUnit, Functions.Function1<? super CompletableFuture<?>, ? extends R>) - Static method in class de.fhg.fokus.xtensions.concurrent.AsyncCompute
-
This method will call the given
runAsync
function using the
common ForkJoinPool
with the
CompletableFuture
being returned.
- asyncSupply(Executor, long, TimeUnit, Functions.Function1<? super CompletableFuture<?>, ? extends R>) - Static method in class de.fhg.fokus.xtensions.concurrent.AsyncCompute
-
This method will call the given runAsync
function using the given executor
.
- asyncSupply(Executor, ScheduledExecutorService, long, TimeUnit, Functions.Function1<? super CompletableFuture<?>, ? extends R>) - Static method in class de.fhg.fokus.xtensions.concurrent.AsyncCompute
-
This method will call the given runAsync
function using the given executor
.
- cancel(CompletableFuture<?>) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
- cancelOnTimeout(CompletableFuture<R>, Duration) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
- cancelOnTimeout(CompletableFuture<R>, long, TimeUnit) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
Defines a timeout for the given future fut
.
- cancelOnTimeout(CompletableFuture<R>, ScheduledExecutorService, long, TimeUnit) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
Defines a timeout for the given future fut
.
- ClassGrouping - Interface in de.fhg.fokus.xtensions.iteration
-
Grouping of objects by a list of classes.
- ClassGroupingList - Interface in de.fhg.fokus.xtensions.iteration
-
- ClassGroupingSet - Interface in de.fhg.fokus.xtensions.iteration
-
- collect(Iterable<T>, Collector<? super T, A, R>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
Simple implementation reducing the elements of an iterable to a return value
using a
Collector
.
- combinations(Iterable<X>, Iterable<Y>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
This function returns a new Iterable providing the elements of the Cartesian Product of the elements provided
by iterable
and the elements of the other
.
- combinations(Iterable<X>, Iterable<Y>, Functions.Function2<? super X, ? super Y, ? extends Z>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
This function returns a new Iterable providing the elements of the Cartesian Product of the elements provided
by iterable
and the elements of the other
.
- combinations(Iterator<X>, Iterable<Y>) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
This function returns a new Iterator providing the elements of the Cartesian Product of the elements provided
by iterator
and the elements of the other
.
- combinations(Iterator<X>, Iterable<Y>, Functions.Function2<? super X, ? super Y, ? extends Z>) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
This function returns a new Iterator providing the elements of the Cartesian Product of the elements provided
by iterator
and the elements of the other
.
- combinations(Stream<T>, Iterable<Z>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
This function returns a stream of the Cartesian product of stream
and the iterable combineWith
.
- combinations(Stream<T>, Functions.Function0<? extends Stream<Z>>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
This function returns a stream of the Cartesian Product of stream
and the elements of the stream
provided by streamSupplier
.
- combinations(Stream<T>, Iterable<Z>, Functions.Function2<? super T, ? super Z, ? extends R>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
This function returns a stream of the Cartesian product of stream
and the iterable combineWith
.
- combinations(Stream<T>, Functions.Function0<? extends Stream<Z>>, Functions.Function2<? super T, ? super Z, ? extends R>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
This function returns a stream of the Cartesian product of stream
and the elements of the stream
provided by streamSupplier
.
- combinationsWhere(Iterable<X>, Iterable<Y>, BiPredicate<X, Y>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
This function returns a new Iterable providing the elements of the Cartesian Product of the elements provided
by iterable
and the elements of the other
.
- combinationsWhere(Iterable<X>, Iterable<Y>, BiPredicate<X, Y>, Functions.Function2<? super X, ? super Y, ? extends Z>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
This function returns a new Iterable providing the elements of the Cartesian Product of the elements provided
by iterable
and the elements of the other
.
- combinationsWhere(Iterator<X>, Iterable<Y>, BiPredicate<X, Y>) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
This function returns a new Iterator providing the elements of the Cartesian Product of the elements provided
by iterator
and the elements of the other
.
- combinationsWhere(Iterator<X>, Iterable<Y>, BiPredicate<X, Y>, Functions.Function2<? super X, ? super Y, ? extends Z>) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
This function returns a new Iterator providing the elements of the Cartesian Product of the elements provided
by iterator
and the elements of the other
.
- combine(Pair<K, V>, Functions.Function2<? super K, ? super V, ? extends R>) - Static method in class de.fhg.fokus.xtensions.pair.PairExtensions
-
Will call the combiner
with the key and the value of pair
and returns
the result of the combiner
call.
- CompletableFutureExtensions - Class in de.fhg.fokus.xtensions.concurrent
-
This class provides static methods (many of them to be used as extension methods)
that enrich the CompletableFuture
class.
- CompletableFutureExtensions() - Constructor for class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
- CompletableFutureExtensions.TimeoutConfig - Class in de.fhg.fokus.xtensions.concurrent
-
- completeWith(CompletableFuture<? super R>, CompletionStage<R>) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
- copy(CompletableFuture<R>) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
Returns a CompletableFuture
that completes normally if the given CompletableFuture
fut
completes normally.
- filter(OptionalDouble, DoublePredicate) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
If the given OptionalDouble self
holds a value and the value tests positive with the given
DoublePredicate predicate
, returns self
, otherwise returns an empty OptionalDouble
.
- filter(Optional<T>, Class<U>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
If a value is present in self
, and the value is instance of the class
clazz
, this method returns self
casted to
Optional<T>
, otherwise returns an empty Optional
.
- filter(OptionalInt, IntPredicate) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
If the given OptionalInt self
holds a value and the value tests positive with the given
IntPredicate predicate
, returns self
, otherwise returns an empty OptionalInt
.
- filter(OptionalLong, LongPredicate) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
If the given OptionalLong self
holds a value and the value tests positive with the given
LongPredicate predicate
, returns self
, otherwise returns an empty OptionalLong
.
- filter(Stream<T>, Class<? extends U>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
Filters the given Stream input
to only contain elements instance
of the given class clazz
.
- filterNull(Stream<T>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
Filters a stream
to not include null
values.
- findAny(Stream<T>, Predicate<T>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
This method is a shortcut for stream.filter(test).findAny()
.
- findFirst(Stream<T>, Predicate<T>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
This method is a shortcut for stream.filter(test).findFirst()
.
- flatMap(Stream<T>, Functions.Function1<? super T, ? extends Iterable<? extends U>>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
This method provides a convenient way to
flatMap
on a
Stream
by providing an
Iterable
instead of a
Stream
.
- flatMapDouble(OptionalDouble, DoubleFunction<OptionalDouble>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
Maps the value of self
to an OptionalDouble
using mapFunc
, if self
has a present
value.
- flatMapInt(OptionalInt, IntFunction<OptionalInt>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
Maps the value of self
to an OptionalInt
using mapFunc
, if self
has a present
value.
- flatMapLong(OptionalLong, LongFunction<OptionalLong>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
Maps the value of self
to an OptionalLong
using mapFunc
, if self
has a present
value.
- flatMatches(Stream<String>, Pattern) - Static method in class de.fhg.fokus.xtensions.stream.StringStreamExtensions
-
Takes stream
, finds matches in each element of the stream according to
the given pattern
and provides all matches in a single stream returned
as the result.
- flatMatches(Stream<String>, String) - Static method in class de.fhg.fokus.xtensions.stream.StringStreamExtensions
-
Takes
stream
, finds matches in each element of the stream according to
the given
pattern
and provides all matches in a single stream returned
as the result.
This method is a wrapper around
flatMatches(Stream, Pattern)
first compiling the parameter
pattern
to a
Pattern
object then delegating to the wrapped function.
- flatSplit(Stream<? extends CharSequence>, String) - Static method in class de.fhg.fokus.xtensions.stream.StringStreamExtensions
-
Splitting the elements of the given stream
by the given pattern
and returning
a single stream of all results of the splits.
- flatSplit(Stream<? extends CharSequence>, Pattern) - Static method in class de.fhg.fokus.xtensions.stream.StringStreamExtensions
-
Splitting the elements of the given stream
by the given pattern
and returning
a single stream of all results of the splits.
- flatSplit(Stream<? extends CharSequence>, String, int) - Static method in class de.fhg.fokus.xtensions.stream.StringStreamExtensions
-
Splitting the elements of the given stream
by the given pattern
and returning
a single stream of all results of the splits.
- flatSplit(Stream<? extends CharSequence>, Pattern, int) - Static method in class de.fhg.fokus.xtensions.stream.StringStreamExtensions
-
Splitting the elements of the given stream
by the given pattern
and returning
a single stream of all results of the splits.
- forEach(T[], Procedures.Procedure1<? super T>) - Static method in class de.fhg.fokus.xtensions.iteration.ArrayExtensions
-
Allows iteration over elements of the given array
and
invoking a given action
for every element without
allocating an Iterable
and Iterator
(as done when
using the built in version of Xtend).
- forEachDouble(DoubleConsumer) - Method in interface de.fhg.fokus.xtensions.iteration.DoubleIterable
-
Iterates over all elements of the iterable and calls consumer
for
each element.
- forEachDouble(double[], DoubleConsumer) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveArrayExtensions
-
This method allows iterating over the primitive values in the given array arr
without boxing the values into objects.
- forEachInt(IntConsumer) - Method in interface de.fhg.fokus.xtensions.iteration.IntIterable
-
Iterates over all elements of the iterable and calls consumer
for
each element.
- forEachInt(int[], IntConsumer) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveArrayExtensions
-
This method allows iterating over the primitive values in the given array arr
without boxing the values into objects.
- forEachInt(Optional<? extends IntegerRange>, IntConsumer) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
When parameter self
contains a range, starts an iteration over all
int
values in that range.
- forEachInt(Optional<? extends IntegerRange>, IntIntConsumer) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
When parameter self
contains a range, starts an iteration over all
int
values in that range.
- forEachInt(IntegerRange, IntConsumer) - Static method in class de.fhg.fokus.xtensions.range.RangeExtensions
-
This method iterates over all integers in range
r
and applies the given
consumer
for every element.
This method is more efficient than the generic iteration extension method
IterableExtensions#forEach
because it uses
IntConsumer
as the receiver of elements in the range, which prevents boxing of the integer values.
- forEachInt(IntegerRange, IntIntConsumer) - Static method in class de.fhg.fokus.xtensions.range.RangeExtensions
-
This method iterates over all integers in range r
and applies the given consumer
for every element, additionally with the index in the range (starting with index 0).
- forEachLong(LongConsumer) - Method in interface de.fhg.fokus.xtensions.iteration.LongIterable
-
Iterates over all elements of the iterable and calls consumer
for
each element.
- forEachLong(long[], LongConsumer) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveArrayExtensions
-
This method allows iterating over the primitive values in the given array arr
without boxing the values into objects.
- forwardCancellation(CompletableFuture<?>, CompletableFuture<?>) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
Registers a callback on future from
so when the future is cancelled, the
future to
will be attempted to be cancelled as well.
- forwardCancellation(CompletableFuture<?>, CompletableFuture<?>, CompletableFuture<?>...) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
Registers a callback on future from
so when the future is cancelled, the
future to
and all futures in toRest
will be attempted to be cancelled as well.
- forwardTo(CompletionStage<R>, CompletableFuture<? super R>) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
This function will forward the result of future from
to future to
.
- FunctionExtensions - Class in de.fhg.fokus.xtensions.function
-
This class provides static extension methods for Xtend and Java 8 functional
interfaces.
- generate(Functions.Function0<? extends DoubleSupplier>) - Static method in interface de.fhg.fokus.xtensions.iteration.DoubleIterable
-
- generate(Functions.Function0<? extends IntSupplier>) - Static method in interface de.fhg.fokus.xtensions.iteration.IntIterable
-
- generate(Functions.Function0<? extends LongSupplier>) - Static method in interface de.fhg.fokus.xtensions.iteration.LongIterable
-
- get(Class<T>) - Method in interface de.fhg.fokus.xtensions.iteration.ClassGrouping
-
Returns a collection of elements grouped by the given class clazz
.
- get(Class<T>) - Method in interface de.fhg.fokus.xtensions.iteration.ClassGroupingList
-
Returns a collection of elements grouped by the given class clazz
.
- get(Class<T>) - Method in interface de.fhg.fokus.xtensions.iteration.ClassGroupingSet
-
Returns a collection of elements grouped by the given class clazz
.
- getGroupingClasses() - Method in interface de.fhg.fokus.xtensions.iteration.ClassGrouping
-
List of classes the grouping grouped object instances by.
- getRejected() - Method in interface de.fhg.fokus.xtensions.iteration.Partition
-
Returns the aggregation of the elements that were rejected by the partition criterion.
- getSelected() - Method in interface de.fhg.fokus.xtensions.iteration.Partition
-
Returns the aggregation of the elements that were selected by the partition criterion.
- groupIntoListBy(Iterable<?>, Class<?>, Class<?>, Class<?>...) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
Groups the elements in iterable
into lists by the classes given via parameters firstGroup
, firstGroup
, and additionalGroups
.
- groupIntoListBy(Iterator<?>, Class<?>, Class<?>, Class<?>...) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
Groups the elements in iterator
into lists by the classes given via parameters firstGroup
, firstGroup
, and additionalGroups
.
- groupIntoSetBy(Iterable<?>, Class<?>, Class<?>, Class<?>...) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
Groups the elements in iterable
into sets by the classes given via parameters firstGroup
, firstGroup
, and additionalGroups
.
- groupIntoSetBy(Iterator<?>, Class<?>, Class<?>, Class<?>...) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
Groups the elements in iterator
into sets by the classes given via parameters firstGroup
, firstGroup
, and additionalGroups
.
- ifAllPresent(List<Optional<T>>, Procedures.Procedure1<? super List<T>>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
Will call the given consumer If opts
is empty, the consumer
will be called with an empty list.
- ifBothPresent(Optional<T>, Optional<U>, Procedures.Procedure2<? super T, ? super U>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
Calls consumer
with values from a
and b
, iff both
optionals have a value present.
- ifNotPresent(OptionalDouble, Procedures.Procedure0) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
Calls the procedure then
if the optional self
holds no
value.
- ifNotPresent(Optional<T>, Procedures.Procedure0) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
Calls the procedure then
if the optional self
holds no value.
- ifNotPresent(OptionalInt, Procedures.Procedure0) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
Calls the procedure then
if the optional self
holds no
value.
- ifNotPresent(OptionalLong, Procedures.Procedure0) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
Calls the procedure then
if the optional self
holds no
value.
- ifPresentOrElse(OptionalDouble, DoubleConsumer, Runnable) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
Will call action
with the value held by self
if it is not
empty.
- ifPresentOrElse(Optional<T>, Consumer<? super T>, Runnable) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
Will call action
with the value held by opt
if it is not
empty.
- ifPresentOrElse(OptionalInt, IntConsumer, Runnable) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
Will call action
with the value held by self
if it is not
empty.
- ifPresentOrElse(OptionalLong, LongConsumer, Runnable) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
Will call action
with the value held by self
if it is not
empty.
- IntIntConsumer - Interface in de.fhg.fokus.xtensions.range
-
This functional interface defines a method consuming two int
values.
- IntIterable - Interface in de.fhg.fokus.xtensions.iteration
-
This interface is a specialized version of an
Iterable<Integer>
providing a
PrimitiveIterator.OfInt
which allows iteration over a
(possibly infinite) amount of unboxed primitive values.
This abstraction can be used in situations where an
IntStream
would
be appropriate, but the user has to be able to create the stream multiple
times.
- intIterator(IntegerRange) - Static method in class de.fhg.fokus.xtensions.range.RangeExtensions
-
- into(Iterable<T>, Collection<X>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
This method will add the elements of iterable
to the target
collection
and then return the target
collection.
- into(Iterable<T>, Collection<X>...) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
This method will add the elements of iterable
to the all of the collection in targets
and then return all those collections in an array.
- into(Iterator<T>, Collection<X>) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
This method will add the elements provided by iterator
to the target
collection
and then return the target
collection.
- into(Iterator<T>, Collection<X>...) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
This method will add the elements provided by iterator
to the all of the collection in targets
and then return all those collections in an array.
- isFalse(T, Functions.Function1<? super T, ? extends Boolean>) - Static method in class de.fhg.fokus.xtensions.primitives.Primitives
-
Here is the logic table of the output of this method based on the inputs.
- isFalse(Boolean) - Static method in class de.fhg.fokus.xtensions.primitives.Primitives
-
Tests if the given Boolean b
is not null
and holds the value false
.
- isNullOrFalse(T, Functions.Function1<? super T, ? extends Boolean>) - Static method in class de.fhg.fokus.xtensions.primitives.Primitives
-
Here is the logic table of the output of this method based on the inputs.
- isNullOrFalse(Boolean) - Static method in class de.fhg.fokus.xtensions.primitives.Primitives
-
Tests if the given Boolean b
is either null
or holds the value false
.
- isNullOrTrue(T, Functions.Function1<? super T, ? extends Boolean>) - Static method in class de.fhg.fokus.xtensions.primitives.Primitives
-
Here is the logic table of the output of this method based on the inputs.
- isNullOrTrue(Boolean) - Static method in class de.fhg.fokus.xtensions.primitives.Primitives
-
Tests if the given Boolean b
is either null
or holds the value true
.
- isTrue(T, Functions.Function1<? super T, ? extends Boolean>) - Static method in class de.fhg.fokus.xtensions.primitives.Primitives
-
Tests if a mapper
function applied to a given context
object returns true
.
- isTrue(Boolean) - Static method in class de.fhg.fokus.xtensions.primitives.Primitives
-
Tests if the given Boolean b
is not null
and holds the value true
.
- IterableExtensions - Class in de.fhg.fokus.xtensions.iteration
-
Additional extension functions for the
Iterable
class.
- iterate(double, DoubleUnaryOperator) - Static method in interface de.fhg.fokus.xtensions.iteration.DoubleIterable
-
Creates
DoubleIterable
an infinite providing an infinite source of
numbers, starting with the given
seed
value and in every
subsequent step the result of the given
operator
applied on the
last step's value.
- iterate(double, DoublePredicate, DoubleUnaryOperator) - Static method in interface de.fhg.fokus.xtensions.iteration.DoubleIterable
-
Creates
DoubleIterable
an which works similar to a traditional for-loop.
- iterate(int, IntUnaryOperator) - Static method in interface de.fhg.fokus.xtensions.iteration.IntIterable
-
Creates
IntIterable
an infinite providing an infinite source of
numbers, starting with the given
seed
value and in every
subsequent step the result of the given
operator
applied on the
last step's value.
- iterate(int, IntPredicate, IntUnaryOperator) - Static method in interface de.fhg.fokus.xtensions.iteration.IntIterable
-
Creates
IntIterable
an which works similar to a traditional for-loop.
- iterate(long, LongUnaryOperator) - Static method in interface de.fhg.fokus.xtensions.iteration.LongIterable
-
Creates
LongIterable
an infinite providing an infinite source of
numbers, starting with the given
seed
value and in every
subsequent step the result of the given
operator
applied on the
last step's value.
- iterate(long, LongPredicate, LongUnaryOperator) - Static method in interface de.fhg.fokus.xtensions.iteration.LongIterable
-
Creates
LongIterable
an which works similar to a traditional for-loop.
- iterate(T, Predicate<? super T>, UnaryOperator<T>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
This method provides functionality that is directly available on the Java 9 Stream class.
This method will construct a Stream that provides seed
as an initial element.
- iterate(Class<Stream>, T, Predicate<? super T>, UnaryOperator<T>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
This method redirects to <T>iterate​(T, Predicate<? super T>, UnaryOperator<T>)
.
This allows e.g.
- iterator() - Method in interface de.fhg.fokus.xtensions.iteration.DoubleIterable
-
Returns a primitive iterator over elements of type double
.
- iterator() - Method in interface de.fhg.fokus.xtensions.iteration.IntIterable
-
Returns a primitive iterator over elements of type int
.
- iterator() - Method in interface de.fhg.fokus.xtensions.iteration.LongIterable
-
Returns a primitive iterator over elements of type long
.
- iterator(OptionalDouble) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
Returns an PrimitiveIterable.OfDouble
that either provides the one value present in self
,
or an PrimitiveIterable.OfDouble
providing no value if self
is empty.
- iterator(Optional<T>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
Returns an
Iterator
that does not return a value if
self
is
empty and an
Iterator
providing just the value of
self
if
present
- iterator(OptionalInt) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
Returns an PrimitiveIterable.OfInt
that either provides the one value present in self
,
or an PrimitiveIterable.OfInt
providing no value if self
is empty.
- iterator(OptionalLong) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
Returns an PrimitiveIterable.OfLong
that either provides the one value present in self
,
or an PrimitiveIterable.OfLong
providing no value if self
is empty.
- IteratorExtensions - Class in de.fhg.fokus.xtensions.iteration
-
Extension methods for the
Iterator
class.
- map(OptionalDouble, DoubleFunction<V>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
Maps the value held by self
to an object wrapped in Optional
if present,
returns an empty Optional
otherwise.
- map(OptionalInt, IntFunction<V>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
Maps the value held by self
to an object wrapped in Optional
if present,
returns an empty Optional
otherwise.
- map(OptionalLong, LongFunction<V>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
Maps the value held by self
to an object wrapped in Optional
if present,
returns an empty Optional
otherwise.
- mapDouble(Iterable<T>, ToDoubleFunction<T>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
This function maps an
Iterable
to a
DoubleIterable
, using the
mapper
function for each element of the original
iterable
.
- mapDouble(Iterator<T>, ToDoubleFunction<T>) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
- mapDouble(OptionalDouble, DoubleUnaryOperator) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
Maps the value of self
to a double
value wrapped into an OptionalDouble
, if self
holds a value.
- mapDouble(Optional<T>, ToDoubleFunction<T>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
Maps the value of self
to a double
value wrapped into an
OptionalDouble
, if self
holds a value.
- mapDouble(OptionalInt, IntToDoubleFunction) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
Maps the value of self
to a double
value wrapped into an OptionalDouble
, if self
holds a value.
- mapDouble(OptionalLong, LongToDoubleFunction) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
Maps the value of self
to a double
value wrapped into an OptionalDouble
, if self
holds a value.
- mapInt(Iterable<T>, ToIntFunction<T>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
This function maps an
Iterable
to an
IntIterable
, using the
mapper
function for each element of the original
iterable
.
- mapInt(Iterator<T>, ToIntFunction<T>) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
- mapInt(OptionalDouble, DoubleToIntFunction) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
Maps the value of self
to an int
value wrapped into an OptionalInt
, if self
holds a value.
- mapInt(Optional<T>, ToIntFunction<T>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
Maps the value of self
to an int
value wrapped into an
OptionalInt
, if self
holds a value.
- mapInt(OptionalInt, IntUnaryOperator) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
Maps the value of self
to an int
value wrapped into an OptionalInt
, if self
holds a value.
- mapInt(OptionalLong, LongToIntFunction) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
Maps the value of self
to an int
value wrapped into an OptionalInt
, if self
holds a value.
- mapLong(Iterable<T>, ToLongFunction<T>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
This function maps an
Iterable
to a
LongIterable
, using the
mapper
function for each element of the original
iterable
.
- mapLong(Iterator<T>, ToLongFunction<T>) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
- mapLong(OptionalDouble, DoubleToLongFunction) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
Maps the value of self
to a long
value wrapped into an OptionalLong
, if self
holds a value.
- mapLong(Optional<T>, ToLongFunction<T>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
Maps the value of self
to a long
value wrapped into an
OptionalLong
, if self
holds a value.
- mapLong(OptionalInt, IntToLongFunction) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
Maps the value of self
to a long
value wrapped into an OptionalLong
, if self
holds a value.
- mapLong(OptionalLong, LongUnaryOperator) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
Maps the value of self
to a long
value wrapped into an OptionalLong
, if self
holds a value.
- mapOrGet(Optional<T>, Functions.Function1<T, U>, Functions.Function0<U>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
This method is like a shortcut for self.map(mapper).orElseGet(fallback)
(ignoring the fact that we are using different functional interfaces).
- matching(Stream<S>, String) - Static method in class de.fhg.fokus.xtensions.stream.StringStreamExtensions
-
Filtering the given
stream
by elements matching the given
pattern
.
This method is a wrapper calling
matching(Stream, Pattern)
by compiling the given
String pattern
to a
Pattern
object before the call.
- matching(Stream<S>, Pattern) - Static method in class de.fhg.fokus.xtensions.stream.StringStreamExtensions
-
Filtering the given stream
by elements matching the given pattern
.
- matchIt(CharSequence, Pattern) - Static method in class de.fhg.fokus.xtensions.string.StringMatchExtensions
-
This function creates an iterator, that lazily finds matching strings according
to the given pattern
sequentially in the input CharSequence.
- matchIt(CharSequence, String) - Static method in class de.fhg.fokus.xtensions.string.StringMatchExtensions
-
This function creates an iterator, that lazily finds matching strings according
to the given pattern
regular expression sequentially in the input CharSequence.
- matchResultIt(CharSequence, Pattern) - Static method in class de.fhg.fokus.xtensions.string.StringMatchExtensions
-
This function creates an iterator, that lazily finds MatchResults according
to the given pattern
regular expression sequentially in the input CharSequence.
- matchResultIt(CharSequence, String) - Static method in class de.fhg.fokus.xtensions.string.StringMatchExtensions
-
This function creates an iterator, that lazily finds MatchResults according
to the given pattern
regular expression sequentially in the input CharSequence.
- max(Stream<T>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
This is a shortcut for stream.max(Comparator.naturalOrder())
.
- maybe(Double) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
This method is a shortcut for the following expression:
- maybe(T) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
- maybe(Integer) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
This method is a shortcut for the following expression:
- maybe(Long) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
This method is a shortcut for the following expression:
- microseconds(long) - Static method in class de.fhg.fokus.xtensions.datetime.DurationExtensions
-
Alias for Duration.of(ms, ChronoUnit.MICROS)
.
- milliseconds(long) - Static method in class de.fhg.fokus.xtensions.datetime.DurationExtensions
-
- min(Stream<T>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
This is a shortcut for stream.min(Comparator.naturalOrder())
.
- minutes(long) - Static method in class de.fhg.fokus.xtensions.datetime.DurationExtensions
-
- onNull(Boolean, BooleanSupplier) - Static method in class de.fhg.fokus.xtensions.primitives.Primitives
-
Unboxes and returns the Boolean b
, or if b
is null
,
returns the value provided by fallback
.
- onNull(Integer, IntSupplier) - Static method in class de.fhg.fokus.xtensions.primitives.Primitives
-
Unboxes and returns the Integer i
, or if i
is null
,
returns the value provided by fallback
.
- onNull(Long, LongSupplier) - Static method in class de.fhg.fokus.xtensions.primitives.Primitives
-
Unboxes and returns the Long l
, or if l
is null
,
returns the value provided by fallback
.
- onNull(Double, DoubleSupplier) - Static method in class de.fhg.fokus.xtensions.primitives.Primitives
-
Unboxes and returns the Double d
, or if l
is null
,
returns the value provided by fallback
.
- operator_divide(Duration, long) - Static method in class de.fhg.fokus.xtensions.datetime.DurationExtensions
-
- operator_doubleArrow(Pair<K, V>, Procedures.Procedure2<? super K, ? super V>) - Static method in class de.fhg.fokus.xtensions.pair.PairExtensions
-
Will call the given consumer
with the key and value extracted from pair
.
- operator_doubleGreaterThan(Functions.Function1<? super T, ? extends R>, Functions.Function1<? super R, ? extends V>) - Static method in class de.fhg.fokus.xtensions.function.FunctionExtensions
-
- operator_doubleLessThan(Functions.Function1<? super T, ? extends R>, Functions.Function1<? super V, ? extends T>) - Static method in class de.fhg.fokus.xtensions.function.FunctionExtensions
-
- operator_elvis(OptionalDouble, double) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
This operator is an alias for:
- operator_elvis(OptionalDouble, DoubleSupplier) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
- operator_elvis(Optional<T>, T) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
- operator_elvis(Optional<T>, Supplier<T>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
- operator_elvis(OptionalInt, int) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
This operator is an alias for:
- operator_elvis(OptionalInt, IntSupplier) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
- operator_elvis(OptionalLong, long) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
This operator is an alias for:
- operator_elvis(OptionalLong, LongSupplier) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
- operator_greaterEqualsThan(Duration, Duration) - Static method in class de.fhg.fokus.xtensions.datetime.DurationExtensions
-
- operator_greaterThan(Duration, Duration) - Static method in class de.fhg.fokus.xtensions.datetime.DurationExtensions
-
- operator_lessEqualsThan(Duration, Duration) - Static method in class de.fhg.fokus.xtensions.datetime.DurationExtensions
-
- operator_lessThan(Duration, Duration) - Static method in class de.fhg.fokus.xtensions.datetime.DurationExtensions
-
- operator_minus(Duration, Duration) - Static method in class de.fhg.fokus.xtensions.datetime.DurationExtensions
-
- operator_minus(Duration) - Static method in class de.fhg.fokus.xtensions.datetime.DurationExtensions
-
- operator_multiply(Duration, long) - Static method in class de.fhg.fokus.xtensions.datetime.DurationExtensions
-
- operator_or(OptionalDouble, Supplier<? extends OptionalDouble>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
Operator that will be de-sugared to call to
OptionalIntExtensions.or(self,alternative)
.
- operator_or(Optional<T>, Optional<? extends T>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
Operator that will be de-sugared to call to
OptionalExtensions.or(self,alternative)
.
- operator_or(Optional<T>, Supplier<? extends Optional<? extends T>>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
Operator that will be de-sugared to call to
OptionalExtensions.or(self,alternativeSupplier)
.
- operator_or(OptionalInt, Supplier<? extends OptionalInt>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
Operator that will be de-sugared to call to
OptionalIntExtensions.or(self,alternativeSupplier)
.
- operator_or(OptionalLong, Supplier<? extends OptionalLong>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
Operator that will be de-sugared to call to
OptionalIntExtensions.or(self,alternative)
.
- operator_plus(Duration, Duration) - Static method in class de.fhg.fokus.xtensions.datetime.DurationExtensions
-
- operator_plus(Stream<? extends T>, Stream<? extends T>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
- operator_spaceship(Duration, Duration) - Static method in class de.fhg.fokus.xtensions.datetime.DurationExtensions
-
- operator_tripleGreaterThan(T, Functions.Function1<? super T, ? extends R>) - Static method in class de.fhg.fokus.xtensions.function.FunctionExtensions
-
This extension operator is the "pipe forward" operator.
- operator_tripleGreaterThan(Pair<T, V>, Functions.Function2<? super T, ? super V, ? extends R>) - Static method in class de.fhg.fokus.xtensions.function.FunctionExtensions
-
This extension operator is the "pipe forward" operator for value-pairs.
- optionalDouble(T, ToDoubleFunction<T>) - Static method in class de.fhg.fokus.xtensions.primitives.Primitives
-
This method is supposed to be used as an extension function on an object
t
to wrap a primitive property into an
OptionalDouble
, producing an empty optional
if the context object
t
is
null
and wrapping the primitive value if
t
is not
null
, e.g.
- OptionalDoubleExtensions - Class in de.fhg.fokus.xtensions.optional
-
This class contains static functions that ease the work with Java 8
OptionalDouble
.
- OptionalExtensions - Class in de.fhg.fokus.xtensions.optional
-
This class contains static functions that ease the work with Java 8
Optional
.
- optionalInt(T, ToIntFunction<T>) - Static method in class de.fhg.fokus.xtensions.primitives.Primitives
-
This method is supposed to be used as an extension function on an object
t
to wrap a primitive property into an
OptionalInt
, producing an empty optional
if the context object
t
is
null
and wrapping the primitive value if
t
is not
null
, e.g.
- OptionalIntExtensions - Class in de.fhg.fokus.xtensions.optional
-
This class contains static functions that ease the work with Java 8
OptionalInt
.
- optionalLong(T, ToLongFunction<T>) - Static method in class de.fhg.fokus.xtensions.primitives.Primitives
-
This method is supposed to be used as an extension function on an object
t
to wrap a primitive property into an
OptionalLong
, producing an empty optional
if the context object
t
is
null
and wrapping the primitive value if
t
is not
null
, e.g.
- OptionalLongExtensions - Class in de.fhg.fokus.xtensions.optional
-
This class contains static functions that ease the work with Java 8
OptionalLong
.
- or(Functions.Function1<? super T, Boolean>, Functions.Function1<? super T, Boolean>) - Static method in class de.fhg.fokus.xtensions.function.FunctionExtensions
-
This method composes two predicate functions (Functions returning a Boolean
value).
- or(OptionalDouble, Supplier<? extends OptionalDouble>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
This method will either return self
if it is not empty, or
otherwise the value supplied by alternative
.
- or(Optional<T>, Optional<? extends T>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
This method will either return self
if it is not empty, or otherwise
alternative
.
- or(Optional<T>, Supplier<? extends Optional<? extends T>>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
This method will either return self
if it is not empty, or otherwise
the value supplied by alternativeSupplier
.
- or(OptionalInt, Supplier<? extends OptionalInt>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
This method will either return self
if it is not empty, or
otherwise the value supplied by alternativeSupplier
.
- or(OptionalLong, Supplier<? extends OptionalLong>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
This method will either return self
if it is not empty, or
otherwise the value supplied by alternativeSupplier
.
- orElseEmpty(Optional<? extends Iterable<T>>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
If the given optional contains an element, the element will be returned,
otherwise an empty iterable is returned.
- orSuper(Optional<? extends U>, Optional<U>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
This method will either return self
if it is not empty, or otherwise
alternative
.
- orSuper(Optional<? extends U>, Functions.Function0<Optional<U>>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
This method will either return self
if it is not empty, or otherwise
the value supplied by alternativeSupplier
.
- orTimeout(CompletableFuture<R>, Procedures.Procedure1<? super CompletableFutureExtensions.TimeoutConfig>) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
This method will return a future that will be completed exceptionally if the given CompletableFuture fut
does not complete in a given timeout interval.
- orTimeout(CompletableFuture<R>, long, TimeUnit) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
This extension function will create a new
CompletableFuture
that will either be completed
with the result of
fut
(either successful or ), or if after the
timeoutTime
in time
unit
the future
fut
was not completed, the returned future will be completed exceptionally with a
TimeoutException
.
- PairExtensions - Class in de.fhg.fokus.xtensions.pair
-
Provides static extension methods for the Pair
class.
- parallelStream(Iterable<T>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
Creates a parallel
Stream
instance for processing the elements
of the Iterable
it
.
If the given
Iterable
is instance of
Collection
, the
parallelStream
method of the Collection interface will
be called.
- parallelStream(IntegerRange) - Static method in class de.fhg.fokus.xtensions.range.RangeExtensions
-
Returns a parallel
IntStream
providing all
int
values
provided by the given
IntegerRange r
.
- parallelStreamRemaining(PrimitiveIterator.OfInt) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveIteratorExtensions
-
Convenience method to turn a primitive iterator into a parallel stream.
- parallelStreamRemaining(PrimitiveIterator.OfLong) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveIteratorExtensions
-
Convenience method to turn a primitive iterator into a parallel stream.
- parallelStreamRemaining(PrimitiveIterator.OfDouble) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveIteratorExtensions
-
Convenience method to turn a primitive iterator into a parallel stream.
- Partition<S,R> - Interface in de.fhg.fokus.xtensions.iteration
-
This interface represents a collection of element partitioned into two parts.
- partitionBy(Iterable<X>, Class<Y>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
This method partitions the elements in iterable
into elements instance of selectionClass
and elements that are not.
- partitionBy(Iterable<X>, Class<Y>, Collector<Y, ?, S>, Collector<X, ?, R>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
This method partitions the elements in iterable
into elements instance of selectionClass
and elements that are not.
- partitionBy(Iterable<X>, Predicate<X>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
This method partitions the elements in iterable
into elements for which partitionPredicate
evaluates to true
and elements for which partitionPredicate
evaluates to false
.
- partitionBy(Iterable<X>, Predicate<X>, Collector<X, ?, AX>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
This method partitions the elements in iterable
into aggregated elements for which partitionPredicate
evaluates to true
and aggregated elements for which partitionPredicate
evaluates to false
.
- partitionBy(Iterable<X>, Predicate<X>, Collector<X, ?, AS>, Collector<X, ?, AR>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
This method partitions the elements in iterable
into aggregated elements for which partitionPredicate
evaluates to true
and aggregated elements for which partitionPredicate
evaluates to false
.
- partitionBy(Iterator<X>, Class<Y>) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
This method partitions the elements in the given iterator
into elements instance of selectionClass
and elements that are not.
- partitionBy(Iterator<X>, Class<Y>, Collector<Y, ?, S>, Collector<X, ?, R>) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
This method partitions the elements provided by the iterator
into elements instance of selectionClass
and elements that are not.
- partitionBy(Iterator<X>, Predicate<X>) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
This method partitions the elements provided by the iterator
into elements for which partitionPredicate
evaluates to true
and elements for which partitionPredicate
evaluates to false
.
- partitionBy(Iterator<X>, Predicate<X>, Collector<X, ?, AX>) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
This method partitions the elements provided by iterator
into aggregated elements for which partitionPredicate
evaluates to true
and aggregated elements for which partitionPredicate
evaluates to false
.
- partitionBy(Iterator<X>, Predicate<X>, Collector<X, ?, AS>, Collector<X, ?, AR>) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
This method partitions the elements provided by iterator
into aggregated elements for which partitionPredicate
evaluates to true
and aggregated elements for which partitionPredicate
evaluates to false
.
- PrimitiveArrayExtensions - Class in de.fhg.fokus.xtensions.iteration
-
This class provides extension methods on arrays of the primitive types int
, long
, float
, and double
.
- PrimitiveIteratorExtensions - Class in de.fhg.fokus.xtensions.iteration
-
This class contains static methods for the primitive iterators defined in
PrimitiveIterator
.
- Primitives - Class in de.fhg.fokus.xtensions.primitives
-
This class mostly provides static functions to be used as extension functions at the end
of null-safe navigation chains.
- safeCombine(Pair<K, V>, Functions.Function2<? super K, ? super V, ? extends R>) - Static method in class de.fhg.fokus.xtensions.pair.PairExtensions
-
If pair
, or key or value of the given pair
is null
, this function returns an empty Optional
.
- SchedulingUtil - Class in de.fhg.fokus.xtensions.concurrent
-
This class provides static functions that can be used to schedule tasks that
are either repeated or delayed by a given amount of time.
- SchedulingUtil.DelaySpecifier - Class in de.fhg.fokus.xtensions.concurrent
-
Adds delay information to an action to be scheduled.
- SchedulingUtil.ScheduledCompletableFuture<T> - Class in de.fhg.fokus.xtensions.concurrent
-
This class implements both
CompletableFuture
and
ScheduledFuture
,
so it can be used in a non-blocking fashion, but still be asked for the delay for
the next execution of a scheduled task.
This class is not intended to be sub-classed outside of the SchedulingUtil.
- seconds(long) - Static method in class de.fhg.fokus.xtensions.datetime.DurationExtensions
-
- setBackwardPropagateCancel(boolean) - Method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions.TimeoutConfig
-
If this method is called with true
, canceling the created timeout future
will try to cancel the original future.
Default value is false
- setCancelOriginalOnTimeout(boolean) - Method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions.TimeoutConfig
-
If this method is called with true
, the original future will be
tried to be canceled if the created timeout future will cancelled.
Default value is false
- setExceptionProvider(Functions.Function0<? extends Throwable>) - Method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions.TimeoutConfig
-
Sets the provider of an exception that will be called on timeout.
- setScheduler(ScheduledExecutorService) - Method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions.TimeoutConfig
-
Sets the scheduler used to schedule the timeout operation.
- setTimeout(Pair<Long, TimeUnit>) - Method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions.TimeoutConfig
-
Sets the time duration after which the timeout operation is triggered.
Default value is 1 second
.
- setTimeout(Duration) - Method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions.TimeoutConfig
-
Sets the time duration after which the timeout operation is triggered.
Default value is 1 second
.
- setTryShutdownScheduler(boolean) - Method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions.TimeoutConfig
-
Defines if the scheduler for cancellation operation should be shut down after
the original future completes or a timeout occurs.
- some(double) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
- some(T) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
- some(int) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
- some(long) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
- someOf(int) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
This method returns an OptionalInt instance wrapping the given int i
.
- someOf(long) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
This method returns an OptionalLong instance wrapping the given long l
.
- splitAsStream(CharSequence, String) - Static method in class de.fhg.fokus.xtensions.string.StringSplitExtensions
-
This method is a shortcut extension method for
java.util.regex.Pattern.compile(pattern).splitAsStream(toSplit)
.
- splitIt(CharSequence, String, int) - Static method in class de.fhg.fokus.xtensions.string.StringSplitExtensions
-
Creates an iterator that splits the input parameter string toSplit
at the given regular expression pattern
.
- splitIt(CharSequence, Pattern, int) - Static method in class de.fhg.fokus.xtensions.string.StringSplitExtensions
-
Creates an iterator that splits the input parameter string toSplit
at the given regular expression pattern
.
- splitIt(CharSequence, Pattern) - Static method in class de.fhg.fokus.xtensions.string.StringSplitExtensions
-
Creates an iterator that splits the input parameter string toSplit
at the given regular expression pattern
.
- splitIt(CharSequence, String) - Static method in class de.fhg.fokus.xtensions.string.StringSplitExtensions
-
Creates an iterator that splits the input parameter string toSplit
at the given regular expression pattern
.
- stream() - Method in interface de.fhg.fokus.xtensions.iteration.DoubleIterable
-
Returns an
DoubleStream
based on the elements in the iterable.
- stream() - Method in interface de.fhg.fokus.xtensions.iteration.IntIterable
-
Returns an
IntStream
based on the elements in the iterable.
- stream(Iterable<T>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
Creates a
Stream
instance for processing the elements
of the Iterable
it
.
If the given
Iterable
is instance of
Collection
, the
stream
method of the Collection interface will
be called.
- stream() - Method in interface de.fhg.fokus.xtensions.iteration.LongIterable
-
Returns an
LongStream
based on the elements in the iterable.
- stream(OptionalDouble) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
This extension function returns a stream of a single element if the given
optional self
contains a value, or no element if the optional is
empty.
- stream(Optional<T>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
This extension function returns a Stream of a single element if the given
Optional self
contains a value, or no element if the Optional is
empty.
This is a forward compatibility extension method for the Java 9 feature on
Optional.
- stream(OptionalInt) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
This extension function returns a stream of a single element if the given
optional self
contains a value, or no element if the optional is
empty.
- stream(OptionalLong) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
This extension function returns a stream of a single element if the given
optional self
contains a value, or no element if the optional is
empty.
- stream(IntegerRange) - Static method in class de.fhg.fokus.xtensions.range.RangeExtensions
-
Returns an
IntStream
providing all
int
values
provided by the given
IntegerRange r
.
- StreamExtensions - Class in de.fhg.fokus.xtensions.stream
-
This class provides static extension methods for the
Stream
class.
- streamRemaining(PrimitiveIterator.OfInt) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveIteratorExtensions
-
Convenience method to turn a primitive iterator into a stream.
- streamRemaining(PrimitiveIterator.OfLong) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveIteratorExtensions
-
Convenience method to turn a primitive iterator into a stream.
- streamRemaining(PrimitiveIterator.OfDouble) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveIteratorExtensions
-
Convenience method to turn a primitive iterator into a stream.
- streamRemainingExhaustive(PrimitiveIterator.OfInt) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveIteratorExtensions
-
Convenience method to turn a primitive iterator into a stream.
- streamRemainingExhaustive(PrimitiveIterator.OfLong) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveIteratorExtensions
-
Convenience method to turn a primitive iterator into a stream.
- streamRemainingExhaustive(PrimitiveIterator.OfDouble) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveIteratorExtensions
-
Convenience method to turn a primitive iterator into a stream.
- StringMatchExtensions - Class in de.fhg.fokus.xtensions.string
-
This class provoides static functions to create iterators that lazily
provide all matches of given regular expressions on an input CharSequence (e.g.
- StringSplitExtensions - Class in de.fhg.fokus.xtensions.string
-
Utility class holding static extension functions to split strings.
- StringStreamExtensions - Class in de.fhg.fokus.xtensions.stream
-
This class provides extension methods for Stream<String>
and in some cases for
Stream<? extends CharSequence>
.
- summarize(PrimitiveIterator.OfInt) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveIteratorExtensions
-
This method will read all remaining
int
values from the given
iterator
and creates and returns an
IntSummaryStatistics
over all
these elements.
- summarize(PrimitiveIterator.OfLong) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveIteratorExtensions
-
This method will read all remaining
long
values from the given
iterator
and creates and returns an
LongSummaryStatistics
over all
these elements.
- summarize(PrimitiveIterator.OfDouble) - Static method in class de.fhg.fokus.xtensions.iteration.PrimitiveIteratorExtensions
-
This method will read all remaining
double
values from the given
iterator
and creates and returns an
DoubleSummaryStatistics
over all
these elements.
- then(CompletableFuture<R>, Consumer<? super R>) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
- then(CompletableFuture<R>, Function<? super R, ? extends U>) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
- then(CompletableFuture<?>, Runnable) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
- toCollection(Stream<T>, Supplier<C>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
This function is a simple shortcut for stream.collect(Collectors.toCollection(collectionFactory))
.
- toList(Optional<T>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
Returns an immutable list that either contains the value, held by the
optional, or an empty immutable list, if the optional is empty.
- toList(Stream<T>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
This function is a simple shortcut for stream.collect(Collectors.toList())
.
- toSet(OptionalDouble) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
Returns an immutable set that either contains the value, held by the
optional, or an empty set, if the optional is empty.
- toSet(Optional<T>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
Returns an immutable set that either contains the value, held by the
optional, or an empty immutable set, if the optional is empty.
- toSet(OptionalInt) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
Returns an immutable set that either contains the value, held by the
optional, or an empty set, if the optional is empty.
- toSet(OptionalLong) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
Returns an immutable set that either contains the value, held by the
optional, or an empty set, if the optional is empty.
- toSet(Stream<T>) - Static method in class de.fhg.fokus.xtensions.stream.StreamExtensions
-
This function is a simple shortcut for stream.collect(Collectors.toSet())
.
- waitFor(long, TimeUnit) - Static method in class de.fhg.fokus.xtensions.concurrent.SchedulingUtil
-
This method returns a CompletableFuture which will be completed
with a null
value on a new thread after after the delay time
specified by the parameters.
The thread calling this method will not block.
- waitFor(Duration) - Static method in class de.fhg.fokus.xtensions.concurrent.SchedulingUtil
-
This method returns a CompletableFuture which will be completed
with a null
value on a new thread after after the delay time
specified by the duration
parameter.
The thread calling this method will not block.
Note: The use of Duration
may cause a loss in time precision, if the overall duration exceeds Long.MAX_VALUE nanoseconds,
which is roughly a duration of 292.5 years.
- waitFor(Duration, Procedures.Procedure1<? super CompletableFuture<?>>) - Static method in class de.fhg.fokus.xtensions.concurrent.SchedulingUtil
-
This method will run the given then
callback after the delay
provided via the parameter duration
.
- waitFor(long, TimeUnit, Procedures.Procedure1<? super CompletableFuture<?>>) - Static method in class de.fhg.fokus.xtensions.concurrent.SchedulingUtil
-
This method will run the given then
callback after the delay
provided via the parameters time
and unit
.
- waitFor(ScheduledExecutorService, long, TimeUnit, Procedures.Procedure1<? super CompletableFuture<?>>) - Static method in class de.fhg.fokus.xtensions.concurrent.SchedulingUtil
-
This method will run the given then
callback after the delay
provided via the parameters time
and unit
.
- weeks(long) - Static method in class de.fhg.fokus.xtensions.datetime.DurationExtensions
-
Alias for Duration.of(w, ChronoUnit.WEEKS)
.
- whenCancelled(CompletableFuture<R>, Procedures.Procedure0) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
Registers
handler
on the given future
fut
to be called when the future is cancelled
(meaning completed with an instance of
CancellationException
).
- whenCancelledAsync(CompletableFuture<R>, Procedures.Procedure0) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
Registers
handler
on the given future
fut
to be called when the future is cancelled
(meaning completed with an instance of
CancellationException
).
- whenCancelledAsync(CompletableFuture<R>, Executor, Procedures.Procedure0) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
Registers
handler
on the given future
fut
to be called when the future is cancelled
(meaning completed with an instance of
CancellationException
).
- whenCancelledInterrupt(CompletableFuture<?>, Procedures.Procedure0) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
This function helps integration of CompletableFuture and blocking APIs.
- whenException(CompletableFuture<R>, Procedures.Procedure1<? super Throwable>) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
Registers handler
on the given future fut
to be called when the future completes
exceptionally.
- whenExceptionAsync(CompletableFuture<R>, Procedures.Procedure1<? super Throwable>) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
Registers handler
on the given future fut
to be called when the future completes
exceptionally.
- whenExceptionAsync(CompletableFuture<R>, Executor, Procedures.Procedure1<? super Throwable>) - Static method in class de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions
-
Registers handler
on the given future fut
to be called when the future completes
exceptionally.
- whenPresent(OptionalDouble, DoubleConsumer) - Static method in class de.fhg.fokus.xtensions.optional.OptionalDoubleExtensions
-
This extension method will check if a value is present in self
and if so will call onPresent
with that value.
- whenPresent(Optional<T>, Procedures.Procedure1<? super T>) - Static method in class de.fhg.fokus.xtensions.optional.OptionalExtensions
-
This extension method will check if a value is present in self
and if
so will call onPresent
with that value.
- whenPresent(OptionalInt, IntConsumer) - Static method in class de.fhg.fokus.xtensions.optional.OptionalIntExtensions
-
This extension method will check if a value is present in self
and if so will call onPresent
with that value.
- whenPresent(OptionalLong, LongConsumer) - Static method in class de.fhg.fokus.xtensions.optional.OptionalLongExtensions
-
This extension method will check if a value is present in self
and if so will call onPresent
with that value.
- withInitialDelay(long, Procedures.Procedure1<? super SchedulingUtil.ScheduledCompletableFuture<?>>) - Method in class de.fhg.fokus.xtensions.concurrent.SchedulingUtil.DelaySpecifier
-
Schedules the given action
according to the time interval specified in the repeatEvery
method used to construct this DelaySpecifier
.
- withoutAll(Iterable<T>, Iterable<?>) - Static method in class de.fhg.fokus.xtensions.iteration.IterableExtensions
-
Filters the given iterable
by filtering all elements out that are also included
in the given Iterable toExclude
.
- withoutAll(Iterator<T>, Iterable<?>) - Static method in class de.fhg.fokus.xtensions.iteration.IteratorExtensions
-
Filters the given iterator
by filtering all elements out that are also included
in the given Iterable toExclude
.