Uses of Class
com.landawn.abacus.util.Pair
-
Uses of Pair in com.landawn.abacus.util
Modifier and TypeMethodDescriptionNoCachingNoUpdating.DisposablePair.copy()
Pair.copy()
static <L,
R> Pair<L, R>[] Pair.emptyArray()
static <T,
E extends Exception>
Pair<u.Nullable<T>,u.Nullable<T>> Iterables.findFirstAndLast
(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicate) Find first and last.static <T,
E extends Exception, E2 extends Exception>
Pair<u.Nullable<T>,u.Nullable<T>> Iterables.findFirstAndLast
(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicateForFirst, Throwables.Predicate<? super T, E2> predicateForLast) Find first and last.static <T,
E extends Exception>
Pair<u.Nullable<T>,u.Nullable<T>> Iterables.findFirstAndLast
(T[] a, Throwables.Predicate<? super T, E> predicate) Find first and last.static <T,
E extends Exception, E2 extends Exception>
Pair<u.Nullable<T>,u.Nullable<T>> Iterables.findFirstAndLast
(T[] a, Throwables.Predicate<? super T, E> predicateForFirst, Throwables.Predicate<? super T, E2> predicateForLast) Find first and last.static <T,
E extends Exception>
Pair<u.OptionalInt,u.OptionalInt> Iterables.findFirstAndLastIndex
(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicate) Find first and last index.static <T,
E extends Exception, E2 extends Exception>
Pair<u.OptionalInt,u.OptionalInt> Iterables.findFirstAndLastIndex
(Collection<? extends T> c, Throwables.Predicate<? super T, E> predicateForFirst, Throwables.Predicate<? super T, E2> predicateForLast) Find first and last index.static <T,
E extends Exception>
Pair<u.OptionalInt,u.OptionalInt> Iterables.findFirstAndLastIndex
(T[] a, Throwables.Predicate<? super T, E> predicate) Find first and last index.static <T,
E extends Exception, E2 extends Exception>
Pair<u.OptionalInt,u.OptionalInt> Iterables.findFirstAndLastIndex
(T[] a, Throwables.Predicate<? super T, E> predicateForFirst, Throwables.Predicate<? super T, E2> predicateForLast) Find first and last index.static <K,
V> Pair<K, V> static <T extends Comparable<? super T>>
Pair<T,T> static <T> Pair<T,
T> N.minMax
(Iterable<? extends T> c, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
Pair<T,T> static <T> Pair<T,
T> N.minMax
(Iterator<? extends T> iter, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
Pair<T,T> N.minMax
(T[] a) static <T> Pair<T,
T> N.minMax
(T[] a, Comparator<? super T> cmp) static Pair<Byte,
u.OptionalByte> Median.of
(byte... 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<Byte,
u.OptionalByte> Median.of
(byte[] 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.static Pair<Character,
u.OptionalChar> Median.of
(char... 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<Character,
u.OptionalChar> Median.of
(char[] 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.static 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.static Pair<Float,
u.OptionalFloat> Median.of
(float... 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<Float,
u.OptionalFloat> Median.of
(float[] 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.static Pair<Integer,
u.OptionalInt> Median.of
(int... 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<Integer,
u.OptionalInt> Median.of
(int[] 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.static 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.static Pair<Short,
u.OptionalShort> Median.of
(short... 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<Short,
u.OptionalShort> Median.of
(short[] 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.static <T extends Comparable<? super T>>
Pair<T,u.Nullable<T>> Median.of
(Collection<T> c) static <T> Pair<T,
u.Nullable<T>> Median.of
(Collection<T> c, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
Pair<T,u.Nullable<T>> Median.of
(T[] 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 <T extends Comparable<? super T>>
Pair<T,u.Nullable<T>> Median.of
(T[] 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.static <T> Pair<T,
u.Nullable<T>> Median.of
(T[] a, int fromIndex, int toIndex, Comparator<? super T> cmp) 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 <T> Pair<T,
u.Nullable<T>> Median.of
(T[] a, Comparator<? super T> cmp) 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 <L,
R> Pair<L, R> Pair.of
(L l, R r) Pair.reverse()
Returns a new instance of Pair<R, L>.BiIterator.toArray()
Result.toPair()
Tuple.Tuple2.toPair()
N.unzip
(Iterable<? extends T> c, Throwables.BiConsumer<? super T, Pair<A, B>, E> unzip) static <T,
A, B, LC extends Collection<A>, RC extends Collection<B>, E extends Exception>
Pair<LC,RC> N.unzip
(Iterable<? extends T> c, Throwables.BiConsumer<? super T, Pair<A, B>, E> unzip, IntFunction<? extends Collection<?>> supplier) Modifier and TypeMethodDescriptionu.Optional<Pair<Long,
List<T>>> LongMultiset.allMaxOccurrences()
All max occurrences.u.Optional<Pair<Integer,
List<T>>> Multiset.allMaxOccurrences()
All max occurrences.u.Optional<Pair<Long,
List<T>>> LongMultiset.allMinOccurrences()
All min occurrences.u.Optional<Pair<Integer,
List<T>>> Multiset.allMinOccurrences()
All min occurrences.Sheet.columns()
Sheet.columns
(int fromColumnIndex, int toColumnIndex) static <K,
V> Map<K, Pair<V, u.Nullable<V>>> Maps.difference
(Map<K, V> map, Map<K, V> map2) <E extends Exception>
u.Optional<Pair<L,R>> Pair.filter
(Throwables.BiPredicate<? super L, ? super R, E> predicate) <E extends Exception>
u.Optional<Pair<L,R>> Pair.filter
(Throwables.Predicate<? super Pair<L, R>, E> predicate) u.Optional<Pair<A,
B>> BiIterator.first()
u.Optional<Pair<A,
B>> BiIterator.last()
Fn.left()
u.Optional<Pair<Long,
T>> LongMultiset.maxOccurrences()
Multiset.maxOccurrences()
static <T extends Comparable<? super T>>
u.Optional<Pair<T,T>> static <T> u.Optional<Pair<T,
T>> Iterables.minMax
(Iterable<? extends T> c, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
u.Optional<Pair<T,T>> static <T> u.Optional<Pair<T,
T>> Iterables.minMax
(Iterator<? extends T> iter, Comparator<? super T> cmp) static <T extends Comparable<? super T>>
u.Optional<Pair<T,T>> Iterables.minMax
(T[] a) static <T> u.Optional<Pair<T,
T>> Iterables.minMax
(T[] a, Comparator<? super T> cmp) u.Optional<Pair<Long,
T>> LongMultiset.minOccurrences()
Multiset.minOccurrences()
static Difference.MapDifference<Map<String,
Object>, Map<String, Object>, Map<String, Pair<Object, Object>>> static Difference.MapDifference<Map<String,
Object>, Map<String, Object>, Map<String, Pair<Object, Object>>> Difference.MapDifference.of
(Object bean1, Object bean2, BiPredicate<?, ?> valueEquivalence) static <CK,
K1 extends CK, V1, K2 extends CK, V2>
Difference.MapDifference<Map<K1,V1>, Map<K2, V2>, Map<CK, Pair<V1, V2>>> Difference.MapDifference.of
(Map<? extends K1, ? extends V1> map1, Map<? extends K2, ? extends V2> map2) static <CK,
K1 extends CK, V1, K2 extends CK, V2>
Difference.MapDifference<Map<K1,V1>, Map<K2, V2>, Map<CK, Pair<V1, V2>>> Difference.MapDifference.of
(Map<? extends K1, ? extends V1> map1, Map<? extends K2, ? extends V2> map2, BiPredicate<? super V1, ? super V2> valueEquivalence) static <L,
R, E extends Exception>
Throwables.BiFunction<L,R, Pair<L, R>, E> Fn.Fnn.pair()
static <L,
R> BiFunction<L, R, Pair<L, R>> Fn.pair()
Fn.right()
Sheet.rows()
Sheet.rows
(int fromRowIndex, int toRowIndex) Pair.stream()
static <K,
V> Map<K, Pair<u.Nullable<V>, u.Nullable<V>>> Maps.symmetricDifference
(Map<K, V> map, Map<K, V> map2) BiIterator.toList()
Fn.Pairs.toList()
u.Optional<Pair<L,
R>> Pair.toOptional()
Fn.Pairs.toSet()
Modifier and TypeMethodDescription<E extends Exception>
voidPair.accept
(Throwables.Consumer<? super Pair<L, R>, E> action) <T,
E extends Exception>
Builder.DataSetBuilderBuilder.DataSetBuilder.divideColumn
(String columnName, Tuple.Tuple2<String, String> newColumnNames, Throwables.BiConsumer<T, Pair<Object, Object>, E> output) <T,
E extends Exception>
voidDataSet.divideColumn
(String columnName, Tuple.Tuple2<String, String> newColumnNames, Throwables.BiConsumer<T, Pair<Object, Object>, E> output) <T,
E extends Exception>
voidRowDataSet.divideColumn
(String columnName, Tuple.Tuple2<String, String> newColumnNames, Throwables.BiConsumer<T, Pair<Object, Object>, E> output) <E extends Exception>
u.Optional<Pair<L,R>> Pair.filter
(Throwables.Predicate<? super Pair<L, R>, E> predicate) void
BiIterator.forEachRemaining
(Consumer<? super Pair<A, B>> action) Deprecated.static <A,
B> BiIterator<A, B> BiIterator.generate
(int fromIndex, int toIndex, IndexedConsumer<Pair<A, B>> output) static <A,
B> BiIterator<A, B> BiIterator.generate
(BooleanSupplier hasNext, Consumer<Pair<A, B>> output) static <A,
B> BiIterator<A, B> Returns an infiniteBiIterator
.<U,
E extends Exception>
UPair.map
(Throwables.Function<? super Pair<L, R>, U, E> mapper) <E extends Exception>
booleanPair.setIf
(L newLeft, R newRight, Throwables.TriPredicate<? super Pair<L, R>, ? super L, ? super R, E> predicate) Set to the specifiednewLeft
andnewRight
and returnstrue
ifpredicate
returns true.<E extends Exception>
booleanSet to the specifiednewLeft
and returnstrue
ifpredicate
returns true.<E extends Exception>
booleanPair.setRightIf
(R newRight, Throwables.BiPredicate<? super Pair<L, R>, ? super R, E> predicate) Set to the specifiednewRight
and returnstrue
ifpredicate
returns true.static <T,
A, B> BiIterator<A, B> BiIterator.unzip
(Iterable<? extends T> iter, BiConsumer<? super T, Pair<A, B>> unzipFunc) static <T,
A, B> BiIterator<A, B> BiIterator.unzip
(Iterator<? extends T> iter, BiConsumer<? super T, Pair<A, B>> unzipFunc) static <T,
A, B> BiIterator<A, B> Iterators.unzip
(Iterable<? extends T> c, BiConsumer<? super T, Pair<A, B>> unzip) static <T,
A, B> BiIterator<A, B> Iterators.unzip
(Iterator<? extends T> iter, BiConsumer<? super T, Pair<A, B>> unzip) N.unzip
(Iterable<? extends T> c, Throwables.BiConsumer<? super T, Pair<A, B>, E> unzip) static <T,
A, B, LC extends Collection<A>, RC extends Collection<B>, E extends Exception>
Pair<LC,RC> N.unzip
(Iterable<? extends T> c, Throwables.BiConsumer<? super T, Pair<A, B>, E> unzip, IntFunction<? extends Collection<?>> supplier) -
Uses of Pair in com.landawn.abacus.util.stream
Modifier and TypeMethodDescriptionabstract Pair<ByteSummaryStatistics,
u.Optional<Map<Percentage, Byte>>> ByteStream.summarizeAndPercentiles()
abstract Pair<CharSummaryStatistics,
u.Optional<Map<Percentage, Character>>> CharStream.summarizeAndPercentiles()
abstract Pair<DoubleSummaryStatistics,
u.Optional<Map<Percentage, Double>>> DoubleStream.summarizeAndPercentiles()
abstract Pair<FloatSummaryStatistics,
u.Optional<Map<Percentage, Float>>> FloatStream.summarizeAndPercentiles()
abstract Pair<IntSummaryStatistics,
u.Optional<Map<Percentage, Integer>>> IntStream.summarizeAndPercentiles()
abstract Pair<LongSummaryStatistics,
u.Optional<Map<Percentage, Long>>> LongStream.summarizeAndPercentiles()
abstract Pair<ShortSummaryStatistics,
u.Optional<Map<Percentage, Short>>> ShortStream.summarizeAndPercentiles()
Modifier and TypeMethodDescriptionstatic <T,
A, D> Collector<T, ?, u.Optional<Pair<T, D>>> Collectors.maxAlll
(Comparator<? super T> comparator, Collector<? super T, A, D> downstream) static <T extends Comparable,
A, D>
Collector<T,?, u.Optional<Pair<T, D>>> static <T,
A, D> Collector<T, ?, u.Optional<Pair<T, D>>> Collectors.minAlll
(Comparator<? super T> comparator, Collector<? super T, A, D> downstream) static <T extends Comparable,
A, D>
Collector<T,?, u.Optional<Pair<T, D>>> static <T extends Comparable>
Collector<T,?, u.Optional<Pair<T, T>>> Collectors.minMax()
static <T> Collector<T,
?, u.Optional<Pair<T, T>>> Collectors.minMax
(Comparator<? super T> comparator) static <T> Collector<T,
?, u.Optional<Pair<T, T>>> Collectors.minMaxBy
(Function<? super T, ? extends Comparable> keyMapper) static <T extends Comparable<? super T>>
Collector<T,?, Pair<T, T>> Collectors.minMaxOrThrow()
Collectors.minMaxOrThrow
(Comparator<? super T> comparator) Modifier and TypeMethodDescriptionstatic <T,
A, D, R> Collector<T, ?, R> Collectors.maxAlll
(Comparator<? super T> comparator, Collector<? super T, A, D> downstream, Function<u.Optional<Pair<T, D>>, R> finisher) static <T,
A, D, R> Collector<T, ?, R> Collectors.minAlll
(Comparator<? super T> comparator, Collector<? super T, A, D> downstream, Function<u.Optional<Pair<T, D>>, R> finisher)