| Modifier and Type | Method and Description |
|---|---|
static <T extends Comparable<T>> |
Comparing.ordered(T lhs,
T rhs)
Returns the two comparable elements ordered in a pair.
|
static <T> Pair<T,T> |
Comparing.ordered(T lhs,
T rhs,
Comparator<T> comparator)
Returns the two elements ordered in a pair.
|
static <T> Pair<Integer,List<T>> |
Pagination.page(long start,
long howMany,
Collection<T> collection)
Creates a page view of a collection.
|
static <T> Pair<Long,List<T>> |
Pagination.LongPages.page(long start,
long howMany,
Collection<T> collection)
Creates a page view of a collection.
|
static <T,C extends Collection<T>> |
Pagination.page(long start,
long howMany,
Collection<T> in,
C out)
Creates a page view of a collection adding elements to the out
collection.
|
static <T,C extends Collection<T>> |
Pagination.LongPages.page(long start,
long howMany,
Collection<T> in,
C out)
Creates a page view of a collection adding elements to the out
collection.
|
static <T> Pair<Integer,List<T>> |
Pagination.page(long start,
long howMany,
Iterable<T> iterable)
Creates a page view of an iterable.
|
static <T> Pair<Long,List<T>> |
Pagination.LongPages.page(long start,
long howMany,
Iterable<T> iterable)
Creates a page view of an iterable.
|
static <T,C extends Collection<T>> |
Pagination.page(long start,
long howMany,
Iterable<T> iterable,
C collection)
Creates a page view of an iterable adding elements to the collection.
|
static <T,C extends Collection<T>> |
Pagination.LongPages.page(long start,
long howMany,
Iterable<T> iterable,
C collection)
Creates a page view of an iterable adding elements to the collection.
|
static <T> Pair<Integer,List<T>> |
Pagination.page(long start,
long howMany,
Iterator<T> iterator)
Creates a page view of an iterator.
|
static <T> Pair<Long,List<T>> |
Pagination.LongPages.page(long start,
long howMany,
Iterator<T> iterator)
Creates a page view of an iterator.
|
static <T,C extends Collection<T>> |
Pagination.page(long start,
long howMany,
Iterator<T> iterator,
C collection)
Creates a page view of an iterator adding elements to the collection.
|
static <T,C extends Collection<T>> |
Pagination.LongPages.page(long start,
long howMany,
Iterator<T> iterator,
C collection)
Creates a page view of an iterator adding elements to the collection.
|
static <T> Pair<Integer,List<T>> |
Pagination.page(long start,
long howMany,
T[] array)
Creates a page view of an array.
|
static <T> Pair<Long,List<T>> |
Pagination.LongPages.page(long start,
long howMany,
T[] array)
Creates a page view of an array.
|
static <T,C extends Collection<T>> |
Pagination.page(long start,
long howMany,
T[] array,
C collection)
Creates a page view of an array adding elements to the collection.
|
static <T,C extends Collection<T>> |
Pagination.LongPages.page(long start,
long howMany,
T[] array,
C collection)
Creates a page view of an array adding elements to the collection.
|
static <T> Pair<List<T>,List<T>> |
Groups.partition(Iterable<T> values,
Predicate<T> partitioner)
Partitions elements from the iterable into two collections containing
elements that match the predicate (left side collection) and elements
that don't (right side collection).
|
static <T,C extends Collection<T>> |
Groups.partition(Iterable<T> values,
Predicate<T> partitioner,
Supplier<C> collectionsProvider)
Partitions elements from the iterable into two collections containing
elements that match the predicate (left side collection) and elements
that don't (right side collection).
|
static <T,CA extends Collection<T>,CR extends Collection<T>> |
Groups.partition(Iterable<T> values,
Predicate<T> partitioner,
Supplier<CA> acceptedCollectionProvider,
Supplier<CR> refusedCollectionProvider)
Partitions elements from the iterable into two collections containing
elements that match the predicate (left side collection) and elements
that don't (right side collection).
|
static <T> Pair<List<T>,List<T>> |
Groups.partition(Iterator<T> values,
Predicate<T> partitioner)
Partitions elements from the iterator into two collections containing
elements that match the predicate (left side collection) and elements
that don't (right side collection).
|
static <T,C extends Collection<T>> |
Groups.partition(Iterator<T> values,
Predicate<T> partitioner,
Supplier<C> collectionsProvider)
Partitions elements from the iterator into two collections containing
elements that match the predicate (left side collection) and elements
that don't (right side collection).
|
static <T,CA extends Collection<T>,CR extends Collection<T>> |
Groups.partition(Iterator<T> values,
Predicate<T> partitioner,
Supplier<CA> acceptedCollectionProvider,
Supplier<CR> refusedCollectionProvider)
Partitions elements from the iterator into two collections containing
elements that match the predicate (left side collection) and elements
that don't (right side collection).
|
static <T> Pair<List<T>,List<T>> |
Groups.partition(T[] values,
Predicate<T> partitioner)
Partitions elements from the array into two collections containing
elements that match the predicate (left side collection) and elements
that don't (right side collection).
|
static <T,C extends Collection<T>> |
Groups.partition(T[] values,
Predicate<T> partitioner,
Supplier<C> collectionsProvider)
Partitions elements from the array into two collections containing
elements that match the predicate (left side collection) and elements
that don't (right side collection).
|
static <T,CA extends Collection<T>,CR extends Collection<T>> |
Groups.partition(T[] values,
Predicate<T> partitioner,
Supplier<CA> acceptedCollectionProvider,
Supplier<CR> refusedCollectionProvider)
Partitions elements from the array into two collections containing
elements that match the predicate (left side collection) and elements
that don't (right side collection).
|
| Modifier and Type | Method and Description |
|---|---|
static <CT,ET> Iterator<Pair<CT,ET>> |
Zips.counted(ET[] array,
Range<CT> range)
Creates an iterator yielding values from the source iterator and its
index.
|
static <CT,ET> Iterator<Pair<CT,ET>> |
Zips.counted(Iterable<ET> iterable,
Range<CT> range)
Creates an iterator yielding values from the source iterator and its
index.
|
static <T> Iterator<Pair<Integer,T>> |
Zips.counted(Iterable<T> iterable)
Creates an iterator yielding values from the source iterator and its
index.
|
static <CT,ET> Iterator<Pair<CT,ET>> |
Zips.counted(Iterator<ET> iterator,
Range<CT> range)
Creates an iterator yielding values from the source iterator and its
index.
|
static <T> Iterator<Pair<Integer,T>> |
Zips.counted(Iterator<T> iterator)
Creates an iterator yielding values from the source iterator and its
index.
|
static <T> Iterator<Pair<Integer,T>> |
Zips.counted(T... array)
Creates an iterator yielding values from the source iterator and its
index.
|
static <T1,T2> Iterator<Pair<Optional<T1>,Optional<T2>>> |
Zips.longest(Iterable<T1> former,
Iterable<T2> latter)
Transforms two iterables to an iterator of tuples, containing
Optional.of(elements) of both iterables occurring at the same position.
|
static <T1,T2> Iterator<Pair<Optional<T1>,Optional<T2>>> |
Zips.longest(Iterator<T1> former,
Iterator<T2> latter)
Transforms two iterators to an iterator of tuples, containing
Optional.of(elements) of both iterators occurring at the same position.
|
static <T1,T2> Iterator<Pair<Optional<T1>,Optional<T2>>> |
Zips.longest(T1[] former,
T2[] latter)
Transforms two arrays to an iterator of tuples, containing
Optional.of(elements) of both arrays occurring at the same position.
|
static <T1,T2> Iterator<Pair<T1,T2>> |
Zips.shortest(Iterable<T1> former,
Iterable<T2> latter)
Transforms two iterables to an iterator of tuples, containing elements of
both iterables occurring at the same position; the iterator stops when
the shortest input iterable is exhausted.
|
static <T1,T2> Iterator<Pair<T1,T2>> |
Zips.shortest(Iterator<T1> former,
Iterator<T2> latter)
Transforms two iterators to an iterator of tuples, containing elements of
both iterators occurring at the same position; the iterator stops when
the shortest input iterable is exhausted.
|
static <T1,T2> Iterator<Pair<T1,T2>> |
Zips.shortest(T1[] former,
T2[] latter)
Transforms two arrays to an iterator of tuples, containing elements of
both arrays occurring at the same position; the iterator stops when the
shortest input iterable is exhausted.
|
static <T,U> Consumer<Pair<T,U>> |
Tuples.tupled(BiConsumer<T,U> consumer)
Adapts a binary consumer to an consumer accepting a pair.
|
static <T,U,R> Function<Pair<T,U>,R> |
Tuples.tupled(BiFunction<T,U,R> function)
Adapts a binary function to a function accepting a pair.
|
static <T,U> Predicate<Pair<T,U>> |
Tuples.tupled(BiPredicate<T,U> predicate)
Adapts a binary predicate to a predicate accepting a pair.
|
| Modifier and Type | Method and Description |
|---|---|
static <M extends Map<K,V>,K,V> |
Consumers.dict(M map,
Pair<K,V>... array)
Yields all elements of the array (in the provided map).
|
static <K,V> Map<K,V> |
Consumers.dict(Pair<K,V>... array)
Yields all element of the array in a map.
|
static <M extends Map<K,V>,K,V> |
Consumers.dict(Supplier<M> supplier,
Pair<K,V>... array)
Yields all elements of the iterator (in a map created by the supplier).
|
| Modifier and Type | Method and Description |
|---|---|
static <K,V> Map<K,V> |
Consumers.dict(Iterable<Pair<K,V>> iterable)
Yields all elements of the iterable's iterator (in a map).
|
static <M extends Map<K,V>,K,V> |
Consumers.dict(Iterable<Pair<K,V>> iterable,
M map)
Yields all elements of the iterator (in the provided map).
|
static <M extends Map<K,V>,K,V> |
Consumers.dict(Iterable<Pair<K,V>> iterable,
Supplier<M> supplier)
Yields all elements of the iterator (in a map created by the supplier).
|
static <K,V> Map<K,V> |
Consumers.dict(Iterator<Pair<K,V>> iterator)
Yields all elements of the iterator (in a map).
|
static <M extends Map<K,V>,K,V> |
Consumers.dict(Iterator<Pair<K,V>> iterator,
M map)
Yields all elements of the iterator (in the provided map).
|
static <M extends Map<K,V>,K,V> |
Consumers.dict(Iterator<Pair<K,V>> iterator,
Supplier<M> supplier)
Yields all elements of the iterator (in a map created by the supplier).
|
static <T,U> BiConsumer<T,U> |
Tuples.Pairs.untupled(Consumer<Pair<T,U>> consumer)
Adapts an consumer accepting a pair to a binary consumer.
|
static <T,U,R> BiFunction<T,U,R> |
Tuples.Pairs.untupled(Function<Pair<T,U>,R> function)
Adapts a function accepting a pair to a binary function.
|
static <T,U> BiPredicate<T,U> |
Tuples.Pairs.untupled(Predicate<Pair<T,U>> predicate)
Adapts a predicate accepting a pair to a binary predicate.
|
| Modifier and Type | Method and Description |
|---|---|
Pair<K,V> |
EntryToPair.apply(Map.Entry<K,V> entry) |
| Modifier and Type | Method and Description |
|---|---|
Iterator<Pair<K,V>> |
MapToPairs.apply(Map<K,V> map) |
| Modifier and Type | Method and Description |
|---|---|
M |
ConsumeIntoMap.apply(Iterator<Pair<K,V>> consumable) |
| Modifier and Type | Method and Description |
|---|---|
Pair<Optional<E1>,Optional<E2>> |
ZipLongestIterator.next()
iterating over the longest iterator gives a Pair of Optional.nothing
indefinitely "no matter how many times you try, you can't shoot the dog"
|
Pair<E1,E2> |
ZipShortestIterator.next() |
| Modifier and Type | Method and Description |
|---|---|
Pair<CA,CR> |
PartitionBy.apply(Iterator<T> values) |
| Modifier and Type | Method and Description |
|---|---|
Pair<T,Long> |
Average.apply(Pair<T,Long> accumulator,
T value) |
| Modifier and Type | Method and Description |
|---|---|
Pair<T,Long> |
Average.apply(Pair<T,Long> accumulator,
T value) |
| Modifier and Type | Method and Description |
|---|---|
Pair<T,T> |
MakeOrder.apply(T lhs,
T rhs) |
| Modifier and Type | Method and Description |
|---|---|
Clause<Pair<T,U>,R> |
BinaryClause.tupled() |
| Modifier and Type | Method and Description |
|---|---|
Pair<Long,TimeUnit> |
TimeStrategy.currentTime() |
Pair<Long,TimeUnit> |
EpochTimeStrategy.currentTime() |
Pair<Long,TimeUnit> |
WarpingTimeStrategy.currentTime() |
Pair<Long,TimeUnit> |
HiResTimeStrategy.currentTime() |
Pair<Long,TimeUnit> |
WarpingKnobs.state() |
| Modifier and Type | Method and Description |
|---|---|
Date |
TimeToDate.apply(Pair<Long,TimeUnit> time) |
| Modifier and Type | Method and Description |
|---|---|
Pair<T1,T2> |
BinaryIdentity.apply(T1 former,
T2 latter) |
Pair<T2,T1> |
Pair.flip() |
<R1,R2> Pair<R1,R2> |
Pair.map(Function<T1,R1> withFirst,
Function<T2,R2> withSecond) |
static <T1,T2> Pair<T1,T2> |
Pair.of(T1 first,
T2 second) |
Copyright © 2017. All rights reserved.