Uses of Class
com.landawn.abacus.util.u.OptionalDouble
Packages that use u.OptionalDouble
-
Uses of u.OptionalDouble in com.landawn.abacus.util
Fields in com.landawn.abacus.util with type parameters of type u.OptionalDoubleModifier and TypeFieldDescriptionstatic final ToDoubleFunction<u.OptionalDouble>
static final Predicate<u.OptionalDouble>
Methods in com.landawn.abacus.util that return u.OptionalDoubleModifier and TypeMethodDescriptionByteList.average()
ByteList.average
(int fromIndex, int toIndex) CharList.average()
CharList.average
(int fromIndex, int toIndex) DoubleList.average()
DoubleList.average
(int fromIndex, int toIndex) FloatList.average()
FloatList.average
(int fromIndex, int toIndex) IntList.average()
IntList.average
(int fromIndex, int toIndex) KahanSummation.average()
LongList.average()
LongList.average
(int fromIndex, int toIndex) ShortList.average()
ShortList.average
(int fromIndex, int toIndex) <E2 extends Exception>
u.OptionalDoubleCheckedStream.averageDouble
(Throwables.ToDoubleFunction<? super T, E2> func) static <T extends Number>
u.OptionalDoubleIterables.averageDouble
(Iterable<? extends T> c) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
u.OptionalDoubleIterables.averageDouble
(Iterable<? extends T> c, Throwables.ToDoubleFunction<? super T, E> func) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
u.OptionalDoubleIterables.averageDouble
(Collection<? extends T> c, int fromIndex, int toIndex) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
u.OptionalDoubleIterables.averageDouble
(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T, E> func) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
u.OptionalDoubleIterables.averageDouble
(T[] a) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
u.OptionalDoubleIterables.averageDouble
(T[] a, int fromIndex, int toIndex) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
u.OptionalDoubleIterables.averageDouble
(T[] a, int fromIndex, int toIndex, Throwables.ToDoubleFunction<? super T, E> func) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
u.OptionalDoubleIterables.averageDouble
(T[] a, Throwables.ToDoubleFunction<? super T, E> func) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.<E2 extends Exception>
u.OptionalDoubleCheckedStream.averageInt
(Throwables.ToIntFunction<? super T, E2> func) static <T extends Number>
u.OptionalDoubleIterables.averageInt
(Iterable<? extends T> c) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
u.OptionalDoubleIterables.averageInt
(Iterable<? extends T> c, Throwables.ToIntFunction<? super T, E> func) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
u.OptionalDoubleIterables.averageInt
(Collection<? extends T> c, int fromIndex, int toIndex) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
u.OptionalDoubleIterables.averageInt
(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T, E> func) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
u.OptionalDoubleIterables.averageInt
(T[] a) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
u.OptionalDoubleIterables.averageInt
(T[] a, int fromIndex, int toIndex) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
u.OptionalDoubleIterables.averageInt
(T[] a, int fromIndex, int toIndex, Throwables.ToIntFunction<? super T, E> func) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
u.OptionalDoubleIterables.averageInt
(T[] a, Throwables.ToIntFunction<? super T, E> func) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.<E2 extends Exception>
u.OptionalDoubleCheckedStream.averageLong
(Throwables.ToLongFunction<? super T, E2> func) static <T extends Number>
u.OptionalDoubleIterables.averageLong
(Iterable<? extends T> c) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
u.OptionalDoubleIterables.averageLong
(Iterable<? extends T> c, Throwables.ToLongFunction<? super T, E> func) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
u.OptionalDoubleIterables.averageLong
(Collection<? extends T> c, int fromIndex, int toIndex) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
u.OptionalDoubleIterables.averageLong
(Collection<? extends T> c, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T, E> func) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
u.OptionalDoubleIterables.averageLong
(T[] a) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
u.OptionalDoubleIterables.averageLong
(T[] a, int fromIndex, int toIndex) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
u.OptionalDoubleIterables.averageLong
(T[] a, int fromIndex, int toIndex, Throwables.ToLongFunction<? super T, E> func) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
u.OptionalDoubleIterables.averageLong
(T[] a, Throwables.ToLongFunction<? super T, E> func) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.LongMultiset.averageOfOccurrences()
Average of occurrences.Multiset.averageOfOccurrences()
Average of occurrences.static u.OptionalDouble
Strings.StrUtil.createDouble
(String str) Returns an emptyOptionalDouble
if the specified string is blank or a invalid double string.static u.OptionalDouble
u.OptionalDouble.empty()
<E extends Exception>
u.OptionalDoubleu.OptionalDouble.filter
(Throwables.DoublePredicate<E> predicate) <E extends Exception>
u.OptionalDoubleDoubleList.findFirst
(Throwables.DoublePredicate<E> predicate) <E extends Exception>
u.OptionalDoubleDoubleList.findLast
(Throwables.DoublePredicate<E> predicate) DoubleIterator.first()
DoubleList.first()
<E extends Exception>
u.OptionalDoubleu.OptionalDouble.flatMap
(Throwables.DoubleFunction<u.OptionalDouble, E> mapper) static u.OptionalDouble
u.OptionalDouble.from
(OptionalDouble op) static <K> u.OptionalDouble
Returns an emptyOptionalDouble
if the specifiedmap
is empty, or no value found by the specifiedkey
, or the value isnull
.<E extends Exception>
u.OptionalDoubleu.OptionalDouble.ifPresent
(Throwables.DoubleConsumer<E> action) <E extends Exception,
E2 extends Exception>
u.OptionalDoubleu.OptionalDouble.ifPresentOrElse
(Throwables.DoubleConsumer<E> action, Throwables.Runnable<E2> emptyAction) If present or else.DoubleList.kthLargest
(int k) DoubleList.kthLargest
(int fromIndex, int toIndex, int k) DoubleIterator.last()
DoubleList.last()
<E extends Exception>
u.OptionalDoubleu.OptionalDouble.map
(Throwables.DoubleUnaryOperator<E> mapper) <E extends Exception>
u.OptionalDoubleu.Nullable.mapToDouble
(Throwables.ToDoubleFunction<? super T, E> mapper) Map to double.<E extends Exception>
u.OptionalDoubleu.Optional.mapToDouble
(Throwables.ToDoubleFunction<? super T, E> mapper) Map to double.<E extends Exception>
u.OptionalDoubleu.OptionalFloat.mapToDouble
(Throwables.ToDoubleFunction<Float, E> mapper) Map to double.<E extends Exception>
u.OptionalDoubleu.OptionalInt.mapToDouble
(Throwables.ToDoubleFunction<Integer, E> mapper) Map to double.<E extends Exception>
u.OptionalDoubleu.OptionalLong.mapToDouble
(Throwables.ToDoubleFunction<Long, E> mapper) Map to double.<E extends Exception>
u.OptionalDoubleu.Nullable.mapToDoubleIfNotNull
(Throwables.ToDoubleFunction<? super T, E> mapper) Map to double if not null.DoubleList.max()
DoubleList.max
(int fromIndex, int toIndex) static u.OptionalDouble
Iterables.max
(double... a) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty.static <T,
E extends Exception>
u.OptionalDoubleIterables.maxDouble
(T[] a, Throwables.ToDoubleFunction<? super T, E> valueExtractor) Returns the maximumdouble
value extracted from the specified arraya
byvalueExtractor
, ordefaultValue
ifa
is null or empty.DoubleList.median()
DoubleList.median
(int fromIndex, int toIndex) DoubleList.min()
DoubleList.min
(int fromIndex, int toIndex) static u.OptionalDouble
Iterables.min
(double... a) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty.static <T,
E extends Exception>
u.OptionalDoubleIterables.minDouble
(T[] a, Throwables.ToDoubleFunction<? super T, E> valueExtractor) Returns the minimumdouble
value extracted from the specified arraya
byvalueExtractor
, ordefaultValue
ifa
is null or empty.static u.OptionalDouble
u.OptionalDouble.of
(double value) static u.OptionalDouble
u.OptionalDouble.ofNullable
(Double val) <E extends Exception>
u.OptionalDoubleu.OptionalDouble.or
(Throwables.Supplier<u.OptionalDouble, E> supplier) <E extends Exception>
u.OptionalDoubleDoubleList.reduce
(Throwables.DoubleBinaryOperator<E> accumulator) This is equivalent to:static <T extends Number>
u.OptionalDoubleReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
u.OptionalDoubleIterables.sumDouble
(Iterable<? extends T> c, Throwables.ToDoubleFunction<? super T, E> func) ReturnsOptionalDouble.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.Methods in com.landawn.abacus.util that return types with arguments of type u.OptionalDoubleModifier and TypeMethodDescriptionstatic Pair<Double,
u.OptionalDouble> Median.of
(double... a) Returns aPair
withleft
is the value at the index of(a.length - 1) / 2
when the array is sorted, and theright
is the value at the index ofa.length / 2
if the length of array is even.static Pair<Double,
u.OptionalDouble> Median.of
(double[] a, int fromIndex, int toIndex) Returns aPair
withleft
is the value at the index of(a.length - 1) / 2
when the array is sorted, and theright
is the value at the index ofa.length / 2
if the length of array is even.Methods in com.landawn.abacus.util with parameters of type u.OptionalDoubleMethod parameters in com.landawn.abacus.util with type arguments of type u.OptionalDoubleModifier and TypeMethodDescription<E extends Exception>
u.OptionalDoubleu.OptionalDouble.flatMap
(Throwables.DoubleFunction<u.OptionalDouble, E> mapper) CheckedStream.mapPartialToDouble
(Throwables.Function<? super T, u.OptionalDouble, E> mapper) Note: copied from StreamEx: https://github.com/amaembo/streamex<E extends Exception>
u.OptionalDoubleu.OptionalDouble.or
(Throwables.Supplier<u.OptionalDouble, E> supplier) -
Uses of u.OptionalDouble in com.landawn.abacus.util.stream
Methods in com.landawn.abacus.util.stream that return u.OptionalDoubleModifier and TypeMethodDescriptionabstract u.OptionalDouble
ByteStream.average()
abstract u.OptionalDouble
CharStream.average()
abstract u.OptionalDouble
DoubleStream.average()
abstract u.OptionalDouble
FloatStream.average()
abstract u.OptionalDouble
IntStream.average()
abstract u.OptionalDouble
LongStream.average()
abstract u.OptionalDouble
ShortStream.average()
abstract u.OptionalDouble
Stream.averageDouble
(ToDoubleFunction<? super T> mapper) abstract u.OptionalDouble
Stream.averageInt
(ToIntFunction<? super T> mapper) abstract u.OptionalDouble
Stream.averageLong
(ToLongFunction<? super T> mapper) abstract <E extends Exception>
u.OptionalDoubleDoubleStream.findAny
(Throwables.DoublePredicate<E> predicate) abstract <E extends Exception>
u.OptionalDoubleDoubleStream.findFirst
(Throwables.DoublePredicate<E> predicate) abstract <E extends Exception>
u.OptionalDoubleDoubleStream.findFirstOrAny
(Throwables.DoublePredicate<E> predicateForFirst) Returns the first element matched bypredicateForFirst
if found or the first element if this stream is not empty Otherwise an emptyOptionalDouble
will be returned.abstract <E extends Exception>
u.OptionalDoubleDoubleStream.findFirstOrLast
(Throwables.DoublePredicate<E> predicateForFirst) Returns the first element matched bypredicateForFirst
if found or the last element if this stream is not empty Otherwise an emptyOptionalDouble
will be returned.abstract <E extends Exception>
u.OptionalDoubleDoubleStream.findLast
(Throwables.DoublePredicate<E> predicate) Consider using:stream.reversed().findFirst(predicate)
for better performance if possible.abstract u.OptionalDouble
DoubleStream.kthLargest
(int k) abstract u.OptionalDouble
DoubleStream.max()
abstract u.OptionalDouble
DoubleStream.min()
abstract u.OptionalDouble
DoubleStream.reduce
(DoubleBinaryOperator op) Methods in com.landawn.abacus.util.stream that return types with arguments of type u.OptionalDoubleModifier and TypeMethodDescriptionstatic <T> Collector<T,
?, u.OptionalDouble> Collectors.averagingDouble
(ToDoubleFunction<? super T> mapper) static <T> Collector<T,
?, u.OptionalDouble> Collectors.averagingInt
(ToIntFunction<? super T> mapper) static <T> Collector<T,
?, u.OptionalDouble> Collectors.averagingLong
(ToLongFunction<? super T> mapper) Methods in com.landawn.abacus.util.stream with parameters of type u.OptionalDoubleMethod parameters in com.landawn.abacus.util.stream with type arguments of type u.OptionalDoubleModifier and TypeMethodDescriptionabstract DoubleStream
DoubleStream.mapPartial
(DoubleFunction<u.OptionalDouble> mapper) Note: copied from StreamEx: https://github.com/amaembo/streamexabstract DoubleStream
Stream.mapPartialToDouble
(Function<? super T, u.OptionalDouble> mapper) Note: copied from StreamEx: https://github.com/amaembo/streamex