Package net.hydromatic.morel.util
Class PairLists.AbstractPairList<T,U>
- Type Parameters:
T- First typeU- Second type
- All Implemented Interfaces:
Iterable<Map.Entry<T,,U>> Collection<Map.Entry<T,,U>> List<Map.Entry<T,,U>> SequencedCollection<Map.Entry<T,,U>> PairList<T,U>
- Direct Known Subclasses:
PairLists.ArrayImmutablePairList,PairLists.EmptyImmutablePairList,PairLists.MapPairList,PairLists.MutablePairList,PairLists.SingletonImmutablePairList
- Enclosing class:
PairLists
abstract static class PairLists.AbstractPairList<T,U>
extends AbstractList<Map.Entry<T,U>>
implements PairList<T,U>
Base class for all implementations of PairList.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.hydromatic.morel.util.PairList
PairList.Builder<T,U>, PairList.IndexedBiConsumer<T, U> -
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a list containing the alternating left and right elements of each pair.voidforEachIndexed(PairList.IndexedBiConsumer<T, U> consumer) Calls a BiConsumer with each pair in this list.left(int index) Returns the left part of theindexth pair.booleannoneMatch(BiPredicate<T, U> predicate) Returns whether the predicate is true for no pairs in this list.right(int index) Returns the right part of theindexth pair.<R> List<R> transform(BiFunction<T, U, R> function) Applies a mapping function to each element of this list.<R> com.google.common.collect.ImmutableList<R> transform2(BiFunction<T, U, R> function) Applies a mapping function to each element of this list.Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, size, sort, spliterator, subList, toArray, toArray
-
Constructor Details
-
AbstractPairList
AbstractPairList()
-
-
Method Details
-
backingList
Returns a list containing the alternating left and right elements of each pair. -
left
Description copied from interface:PairListReturns the left part of theindexth pair. -
right
Description copied from interface:PairListReturns the right part of theindexth pair. -
forEachIndexed
Description copied from interface:PairListCalls a BiConsumer with each pair in this list.- Specified by:
forEachIndexedin interfacePairList<T,U>
-
transform
Description copied from interface:PairListApplies a mapping function to each element of this list. -
transform2
Description copied from interface:PairListApplies a mapping function to each element of this list.- Specified by:
transform2in interfacePairList<T,U>
-
noneMatch
Description copied from interface:PairListReturns whether the predicate is true for no pairs in this list.
-