Uses of Class
com.landawn.abacus.util.u.OptionalLong
Packages that use u.OptionalLong
-
Uses of u.OptionalLong in com.landawn.abacus.util
Fields in com.landawn.abacus.util with type parameters of type u.OptionalLongModifier and TypeFieldDescriptionstatic final ToLongFunction<u.OptionalLong>
Fn.GET_AS_LONG
static final Predicate<u.OptionalLong>
Methods in com.landawn.abacus.util that return u.OptionalLongModifier and TypeMethodDescriptionstatic u.OptionalLong
Numbers.createLong
(String str) Convert aString
to aLong
; since 3.1 it handles hex (0Xhhhh) and octal (0ddd) notations.static u.OptionalLong
u.OptionalLong.empty()
<E extends Exception>
u.OptionalLongu.OptionalLong.filter
(Throwables.LongPredicate<E> predicate) <E extends Exception>
u.OptionalLongLongList.findFirst
(Throwables.LongPredicate<E> predicate) <E extends Exception>
u.OptionalLongLongList.findLast
(Throwables.LongPredicate<E> predicate) LongIterator.first()
LongList.first()
<E extends Exception>
u.OptionalLongu.OptionalLong.flatMap
(Throwables.LongFunction<u.OptionalLong, E> mapper) static u.OptionalLong
u.OptionalLong.from
(OptionalLong op) static <K> u.OptionalLong
Returns an emptyOptionalLong
if the specifiedmap
is empty, or no value found by the specifiedkey
, or the value isnull
.<E extends Exception>
u.OptionalLongu.OptionalLong.ifPresent
(Throwables.LongConsumer<E> action) <E extends Exception,
E2 extends Exception>
u.OptionalLongu.OptionalLong.ifPresentOrElse
(Throwables.LongConsumer<E> action, Throwables.Runnable<E2> emptyAction) If present or else.LongList.kthLargest
(int k) LongList.kthLargest
(int fromIndex, int toIndex, int k) LongIterator.last()
LongList.last()
<E extends Exception>
u.OptionalLongu.OptionalLong.map
(Throwables.LongUnaryOperator<E> mapper) <E extends Exception>
u.OptionalLongu.Nullable.mapToLong
(Throwables.ToLongFunction<? super T, E> mapper) Map to long.<E extends Exception>
u.OptionalLongu.Optional.mapToLong
(Throwables.ToLongFunction<? super T, E> mapper) Map to long.<E extends Exception>
u.OptionalLongu.OptionalDouble.mapToLong
(Throwables.ToLongFunction<Double, E> mapper) Map to long.<E extends Exception>
u.OptionalLongu.OptionalInt.mapToLong
(Throwables.ToLongFunction<Integer, E> mapper) Map to long.<E extends Exception>
u.OptionalLongu.Nullable.mapToLongIfNotNull
(Throwables.ToLongFunction<? super T, E> mapper) Map to long if not null.static u.OptionalLong
Iterables.max
(long... a) ReturnsOptionalLong.empty()
if the specifiedArray/Collection
isnull
or empty.LongList.max()
LongList.max
(int fromIndex, int toIndex) LongList.median()
LongList.median
(int fromIndex, int toIndex) static u.OptionalLong
Iterables.min
(long... a) ReturnsOptionalLong.empty()
if the specifiedArray/Collection
isnull
or empty.LongList.min()
LongList.min
(int fromIndex, int toIndex) static u.OptionalLong
u.OptionalLong.of
(long value) static u.OptionalLong
u.OptionalLong.ofNullable
(Long val) <E extends Exception>
u.OptionalLongu.OptionalLong.or
(Throwables.Supplier<u.OptionalLong, E> supplier) <E extends Exception>
u.OptionalLongLongList.reduce
(Throwables.LongBinaryOperator<E> accumulator) This is equivalent to:static <T extends Number>
u.OptionalLongReturnsOptionalLong.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
u.OptionalLongIterables.sumInt
(Iterable<? extends T> c, Throwables.ToIntFunction<? super T, E> func) ReturnsOptionalLong.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T extends Number>
u.OptionalLongReturnsOptionalLong.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.static <T,
E extends Exception>
u.OptionalLongIterables.sumLong
(Iterable<? extends T> c, Throwables.ToLongFunction<? super T, E> func) ReturnsOptionalLong.empty()
if the specifiedArray/Collection
isnull
or empty, orfromIndex == toIndex
.Methods in com.landawn.abacus.util that return types with arguments of type u.OptionalLongModifier and TypeMethodDescriptionstatic Pair<Long,
u.OptionalLong> Median.of
(long... 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<Long,
u.OptionalLong> Median.of
(long[] 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.OptionalLongMethod parameters in com.landawn.abacus.util with type arguments of type u.OptionalLongModifier and TypeMethodDescription<E extends Exception>
u.OptionalLongu.OptionalLong.flatMap
(Throwables.LongFunction<u.OptionalLong, E> mapper) ExceptionalStream.mapPartialToLong
(Throwables.Function<? super T, u.OptionalLong, E> mapper) Note: copied from StreamEx: https://github.com/amaembo/streamex<E extends Exception>
u.OptionalLongu.OptionalLong.or
(Throwables.Supplier<u.OptionalLong, E> supplier) -
Uses of u.OptionalLong in com.landawn.abacus.util.stream
Methods in com.landawn.abacus.util.stream that return u.OptionalLongModifier and TypeMethodDescriptionabstract <E extends Exception>
u.OptionalLongLongStream.findAny
(Throwables.LongPredicate<E> predicate) abstract <E extends Exception>
u.OptionalLongLongStream.findFirst
(Throwables.LongPredicate<E> predicate) abstract <E extends Exception>
u.OptionalLongLongStream.findFirstOrAny
(Throwables.LongPredicate<E> predicateForFirst) Returns the first element matched bypredicateForFirst
if found or the first element if this stream is not empty Otherwise an emptyOptionalLong
will be returned.abstract <E extends Exception>
u.OptionalLongLongStream.findFirstOrLast
(Throwables.LongPredicate<E> predicateForFirst) Returns the first element matched bypredicateForFirst
if found or the last element if this stream is not empty Otherwise an emptyOptionalLong
will be returned.abstract <E extends Exception>
u.OptionalLongLongStream.findLast
(Throwables.LongPredicate<E> predicate) Consider using:stream.reversed().findFirst(predicate)
for better performance if possible.abstract u.OptionalLong
LongStream.kthLargest
(int k) abstract u.OptionalLong
LongStream.max()
abstract u.OptionalLong
LongStream.min()
abstract u.OptionalLong
LongStream.reduce
(LongBinaryOperator op) Methods in com.landawn.abacus.util.stream with parameters of type u.OptionalLongMethod parameters in com.landawn.abacus.util.stream with type arguments of type u.OptionalLongModifier and TypeMethodDescriptionabstract LongStream
LongStream.mapPartial
(LongFunction<u.OptionalLong> mapper) Note: copied from StreamEx: https://github.com/amaembo/streamexabstract LongStream
Stream.mapPartialToLong
(Function<? super T, u.OptionalLong> mapper) Note: copied from StreamEx: https://github.com/amaembo/streamex