Package com.github.underscore
Class Underscore.Chain<T>
java.lang.Object
com.github.underscore.Underscore.Chain<T>
- Direct Known Subclasses:
U.Chain
- Enclosing class:
- Underscore<T>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchunk
(int size) chunk
(int size, int step) compact()
containsWith
(T elem) countBy()
<F> Underscore.Chain<Map<F,
Integer>> cycle
(int times) difference
(List<T>... lists) distinct()
<F> Underscore.Chain<F>
distinctBy
(Function<T, F> func) filterFalse
(Predicate<T> pred) filterIndexed
(PredicateIndexed<T> pred) <E> Underscore.Chain<Optional<T>>
first()
first
(int n) firstOrNull
(Predicate<T> pred) flatten()
forEachRight
(Consumer<T> func) <F> Underscore.Chain<Map<F,
List<T>>> <F> Underscore.Chain<Map<F,
Optional<T>>> groupBy
(Function<T, F> func, BinaryOperator<T> binaryOperator) initial()
initial
(int n) interposeByList
(Iterable<T> interIter) intersection
(List<T>... lists) boolean
isEmpty()
boolean
item()
join()
last()
last
(int n) lastOrNull
(Predicate<T> pred) limit
(int size) map()
<F> Underscore.Chain<F>
<F> Underscore.Chain<F>
mapIndexed
(BiFunction<Integer, ? super T, F> func) <F> Underscore.Chain<F>
mapMulti
(BiConsumer<? super T, ? super Consumer<F>> mapper) max()
<F extends Comparable<? super F>>
Underscore.Chain<T>min()
<F extends Comparable<? super F>>
Underscore.Chain<T>Underscore.Chain<Tuple<T,
List<T>>> pop()
range
(int stop) range
(int start, int stop) range
(int start, int stop, int step) <F> Underscore.Chain<F>
reduce
(BiFunction<F, T, F> func, F zeroElem) reduce
(BinaryOperator<T> func) <F> Underscore.Chain<F>
reduceRight
(BiFunction<F, T, F> func, F zeroElem) reduceRight
(BinaryOperator<T> func) rejectIndexed
(PredicateIndexed<T> pred) replaceIndexed
(PredicateIndexed<T> pred, T value) rest()
rest
(int n) reverse()
sample()
sample
(int howMany) Underscore.Chain<Tuple<T,
List<T>>> shift()
shuffle()
int
size()
skip
(int numberToSkip) slice
(int start) slice
(int start, int end) sort()
<F extends Comparable<? super F>>
Underscore.Chain<T><K> Underscore.Chain<Map<K,
Comparable>> sortBy
(K key) <F extends Comparable<? super F>>
Underscore.Chain<F>sortWith
(Comparator<F> comparator) splitAt
(int position) takeSkipping
(int stepSize) toList()
<K,
V> Underscore.Chain<Map<K, V>> toMap()
toString()
uniq()
<F> Underscore.Chain<T>
value()
<E> Underscore.Chain<T>
-
Field Details
-
item
-
list
-
map
-
-
Constructor Details
-
Chain
-
Chain
-
Chain
-
-
Method Details
-
first
-
first
-
first
-
first
-
firstOrNull
-
firstOrNull
-
initial
-
initial
-
last
-
last
-
lastOrNull
-
lastOrNull
-
rest
-
rest
-
compact
-
compact
-
flatten
-
map
-
mapMulti
-
mapIndexed
-
replace
-
replaceIndexed
-
filter
-
filterIndexed
-
reject
-
rejectIndexed
-
filterFalse
-
reduce
-
reduce
-
reduceRight
-
reduceRight
-
find
-
findLast
-
max
-
max
-
min
-
min
-
sort
-
sortWith
-
sortBy
-
sortBy
-
groupBy
-
groupBy
public <F> Underscore.Chain<Map<F,Optional<T>>> groupBy(Function<T, F> func, BinaryOperator<T> binaryOperator) -
indexBy
-
countBy
-
countBy
-
shuffle
-
sample
-
sample
-
tap
-
forEach
-
forEachRight
-
every
-
some
-
count
-
contains
-
containsWith
-
invoke
-
invoke
-
pluck
-
where
-
findWhere
-
uniq
-
uniq
-
distinct
-
distinctBy
-
union
-
intersection
-
difference
-
range
-
range
-
range
-
chunk
-
chunk
-
chunkFill
-
chunkFill
-
cycle
-
interpose
-
interposeByList
-
concat
-
slice
-
slice
-
splitAt
-
takeSkipping
-
reverse
-
join
-
join
-
push
-
pop
-
shift
-
unshift
-
skip
-
limit
-
toMap
-
isEmpty
public boolean isEmpty() -
isNotEmpty
public boolean isNotEmpty() -
size
public int size() -
item
-
value
-
map
-
toList
-
toString
-