T
- the type of elements held in this toXpublic interface IndexedSequenceX<T> extends FluentCollectionX<T>
Supports operations such as adding / removing elements via a Fluent API
Modifier and Type | Method and Description |
---|---|
IndexedSequenceX<T> |
filter(java.util.function.Predicate<? super T> pred)
Keep only elements for which the supplied predicates hold
e.g.
|
<R> IndexedSequenceX<R> |
flatMap(java.util.function.Function<? super T,? extends java.lang.Iterable<? extends R>> mapper)
Perform a flatMap operation on this toX.
|
default ListX<T> |
intercalate(java.util.List<? extends java.util.List<? extends T>> listOfLists)
Intercalate
|
<R> IndexedSequenceX<R> |
map(java.util.function.Function<? super T,? extends R> mapper)
Transform this functor using the supplied transformation function
|
IndexedSequenceX<T> |
minus(int i)
Remove the element at the supplied index
|
IndexedSequenceX<T> |
minus(java.lang.Object e)
Remove the specified element from this toX
|
IndexedSequenceX<T> |
minusAll(java.util.Collection<?> list)
Remove all the specified elements from this toX
|
IndexedSequenceX<T> |
plus(int i,
T e)
Add the supplied element at the supplied index
|
IndexedSequenceX<T> |
plus(T e)
Add an element to this Collection
|
IndexedSequenceX<T> |
plusAll(java.util.Collection<? extends T> list)
Add all supplied elements to this Collection
|
IndexedSequenceX<T> |
plusAll(int i,
java.util.Collection<? extends T> list)
Add all of the supplied elements at the supplied index
|
IndexedSequenceX<T> |
subList(int start,
int end)
Create a sub sequence between the two supplied index
|
IndexedSequenceX<T> |
with(int i,
T e)
Replace the value at the specifed index with the supplied value
|
plusInOrder, plusLoop, plusLoop, unit
cast, combinations, combinations, combine, cycle, cycle, cycleUntil, cycleWhile, distinct, drop, dropRight, dropUntil, dropWhile, eager, evaluation, filterNot, findAny, findFirst, flatMapP, flatMapP, flatMapS, forEach2, forEach2, forEach3, forEach3, forEach4, forEach4, from, fromCollection, getAtIndex, groupBy, grouped, grouped, grouped, grouped, groupedStatefullyUntil, groupedUntil, groupedUntil, groupedWhile, groupedWhile, head, headAndTail, intersperse, isEager, isEmpty, isLazy, isMaterialized, iterator, lazy, limit, limitLast, limitUntil, limitWhile, materialize, materializeReversed, notNull, onEmpty, onEmptyGet, onEmptyThrow, peek, permutations, removeAll, removeAllI, removeAllS, retainAll, retainAllI, retainAllS, reverse, scanLeft, scanLeft, scanRight, scanRight, shuffle, shuffle, single, single, singleUnsafe, skip, skipLast, skipUntil, skipWhile, slice, sliding, sliding, sorted, sorted, sorted, stream, take, takeOne, takeRight, takeUntil, takeWhile, toX, trampoline, unit, zip, zip, zip3, zip4, zipS, zipS, zipWithIndex
asFunction, foldFuture, foldLazy, foldTry, forEach, forEach, forEach, forEach, forEach, forEachSubscribe, forEachSubscribe, forEachSubscribe, runFuture, runLazy, seq, toListX, toSetX, visit
allMatch, anyMatch, collect, collectors, commonPrefix, commonSuffix, count, count, countDistinct, countDistinct, countDistinctBy, countDistinctBy, max, maxBy, min, minBy, mode, noneMatch, sum, sumDouble, sumInt, sumLong, to, toList, toMap, toMap, toSet, toString, toString
endsWith, endsWithIterable, firstValue, foldLeft, foldLeft, foldLeft, foldLeft, foldRight, foldRight, foldRight, foldRightMapToType, get, join, join, join, mapReduce, mapReduce, print, print, printErr, printOut, reduce, reduce, reduce, reduce, reduce, reduce, reduce, schedule, scheduleFixedDelay, scheduleFixedRate, startsWith, startsWithIterable, xMatch
append, append, combine, deleteBetween, insertAt, insertAtS, mapToDouble, mapToInt, mapToLong, prepend, prepend, prependS, recover, recover, subscribe, traversable, unitIterator, zip, zip3, zip4, zipP, zipP, zipWith, zipWithP, zipWithS
retry, retry
groupedStatefullyUntilT, groupedT, groupedUntilT, groupedWhileT, slidingT, slidingT
fixedDelay, onePer, xPer
add, addAll, clear, contains, containsAll, equals, hashCode, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, toArray, toArray
unwrap, unwrapIfInstance, unwrapNested
IndexedSequenceX<T> plus(T e)
FluentCollectionX
plus
in interface FluentCollectionX<T>
e
- Element to addIndexedSequenceX<T> plusAll(java.util.Collection<? extends T> list)
FluentCollectionX
plusAll
in interface FluentCollectionX<T>
list
- of elements to addIndexedSequenceX<T> with(int i, T e)
i
- Index to one value ate
- Value to useIndexedSequenceX<T> plus(int i, T e)
i
- Index to add element ate
- Element to addIndexedSequenceX<T> plusAll(int i, java.util.Collection<? extends T> list)
i
- Index to add element atlist
- Collection of elements to addIndexedSequenceX<T> minus(java.lang.Object e)
FluentCollectionX
minus
in interface FluentCollectionX<T>
e
- Element to removeIndexedSequenceX<T> minusAll(java.util.Collection<?> list)
FluentCollectionX
minusAll
in interface FluentCollectionX<T>
list
- of elements to removeIndexedSequenceX<T> minus(int i)
i
- Index at which to remvoe elementIndexedSequenceX<T> subList(int start, int end)
start
- Index of our sub sequence (inclusive)end
- Index of our sub sequence (exclusive)IndexedSequenceX<T> filter(java.util.function.Predicate<? super T> pred)
Filters
of(1,2,3).filter(i->i>2);
//[3]
filter
in interface CollectionX<T>
filter
in interface FilterableTransformable<T>
filter
in interface Filters<T>
pred
- to filter elements by, retaining matches<R> IndexedSequenceX<R> map(java.util.function.Function<? super T,? extends R> mapper)
Transformable
of(1,2,3).map(i->i*2)
//[2,4,6]
map
in interface CollectionX<T>
map
in interface FilterableTransformable<T>
map
in interface Transformable<T>
mapper
- Transformation function<R> IndexedSequenceX<R> flatMap(java.util.function.Function<? super T,? extends java.lang.Iterable<? extends R>> mapper)
CollectionX
flatMap
in interface CollectionX<T>
mapper
- Transformation function to be applied (and flattened)