Package com.github.underscore
Class U.Chain<T>
java.lang.Object
com.github.underscore.Underscore.Chain<T>
com.github.underscore.U.Chain<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchunk
(int size) chunk
(int size, int step) compact()
containsWith
(T elem) countBy()
createPermutationWithRepetition
(int permutationLength) cycle
(int times) deburr()
difference
(List<T>... lists) distinct()
<F> U.Chain<F>
distinctBy
(Function<T, F> func) drop()
dropRightWhile
(Predicate<T> pred) fetch()
filterFalse
(Predicate<T> pred) filterIndexed
(PredicateIndexed<T> pred) first()
first
(int n) firstOrNull
(Predicate<T> pred) flatten()
forEachRight
(Consumer<T> func) fromJson()
fromXml()
groupBy
(Function<T, F> func, BinaryOperator<T> binaryOperator) initial()
initial
(int n) interposeByList
(Iterable<T> interIter) intersection
(List<T>... lists) join()
last()
last
(int n) lastOrNull
(Predicate<T> pred) limit
(int size) <F> U.Chain<F>
<F> U.Chain<F>
mapIndexed
(BiFunction<Integer, ? super T, F> func) <F> U.Chain<F>
mapMulti
(BiConsumer<? super T, ? super Consumer<F>> mapper) max()
<F extends Comparable<? super F>>
U.Chain<T>mean()
median()
min()
<F extends Comparable<? super F>>
U.Chain<T>pad
(int length) padEnd
(int length) padStart
(int length) range
(int stop) range
(int start, int stop) range
(int start, int stop, int step) <F> U.Chain<F>
reduce
(BiFunction<F, T, F> func, F zeroElem) reduce
(BinaryOperator<T> func) <F> U.Chain<F>
reduceRight
(BiFunction<F, T, F> func, F zeroElem) reduceRight
(BinaryOperator<T> func) rejectIndexed
(PredicateIndexed<T> pred) repeat
(int length) rest()
rest
(int n) reverse()
sample()
sample
(int howMany) shuffle()
skip
(int numberToSkip) slice
(int start) slice
(int start, int end) sort()
<F extends Comparable<? super F>>
U.Chain<T><K> U.Chain<Map<K,
Comparable>> sortBy
(K key) <F extends Comparable<? super F>>
U.Chain<F>sortWith
(Comparator<F> comparator) startsWith
(String target) startsWith
(String target, Integer position) sum()
take()
takeRightWhile
(Predicate<T> pred) toJson()
toMap()
toXml()
trim()
trimEnd()
trunc()
trunc
(int length) uniq()
words()
Methods inherited from class com.github.underscore.Underscore.Chain
first, first, isEmpty, isNotEmpty, item, map, pop, push, replace, replaceIndexed, shift, size, splitAt, takeSkipping, toList, toString, unshift, value
-
Constructor Details
-
Chain
-
Chain
-
Chain
-
-
Method Details
-
first
- Overrides:
first
in classUnderscore.Chain<T>
-
first
- Overrides:
first
in classUnderscore.Chain<T>
-
firstOrNull
- Overrides:
firstOrNull
in classUnderscore.Chain<T>
-
firstOrNull
- Overrides:
firstOrNull
in classUnderscore.Chain<T>
-
initial
- Overrides:
initial
in classUnderscore.Chain<T>
-
initial
- Overrides:
initial
in classUnderscore.Chain<T>
-
last
- Overrides:
last
in classUnderscore.Chain<T>
-
last
- Overrides:
last
in classUnderscore.Chain<T>
-
lastOrNull
- Overrides:
lastOrNull
in classUnderscore.Chain<T>
-
lastOrNull
- Overrides:
lastOrNull
in classUnderscore.Chain<T>
-
rest
- Overrides:
rest
in classUnderscore.Chain<T>
-
rest
- Overrides:
rest
in classUnderscore.Chain<T>
-
compact
- Overrides:
compact
in classUnderscore.Chain<T>
-
compact
- Overrides:
compact
in classUnderscore.Chain<T>
-
flatten
- Overrides:
flatten
in classUnderscore.Chain<T>
-
map
- Overrides:
map
in classUnderscore.Chain<T>
-
mapMulti
- Overrides:
mapMulti
in classUnderscore.Chain<T>
-
mapIndexed
- Overrides:
mapIndexed
in classUnderscore.Chain<T>
-
filter
- Overrides:
filter
in classUnderscore.Chain<T>
-
filterIndexed
- Overrides:
filterIndexed
in classUnderscore.Chain<T>
-
rejectIndexed
- Overrides:
rejectIndexed
in classUnderscore.Chain<T>
-
reject
- Overrides:
reject
in classUnderscore.Chain<T>
-
filterFalse
- Overrides:
filterFalse
in classUnderscore.Chain<T>
-
reduce
- Overrides:
reduce
in classUnderscore.Chain<T>
-
reduce
- Overrides:
reduce
in classUnderscore.Chain<T>
-
reduceRight
- Overrides:
reduceRight
in classUnderscore.Chain<T>
-
reduceRight
- Overrides:
reduceRight
in classUnderscore.Chain<T>
-
find
- Overrides:
find
in classUnderscore.Chain<T>
-
findLast
- Overrides:
findLast
in classUnderscore.Chain<T>
-
max
- Overrides:
max
in classUnderscore.Chain<T>
-
max
- Overrides:
max
in classUnderscore.Chain<T>
-
min
- Overrides:
min
in classUnderscore.Chain<T>
-
min
- Overrides:
min
in classUnderscore.Chain<T>
-
sort
- Overrides:
sort
in classUnderscore.Chain<T>
-
sortWith
- Overrides:
sortWith
in classUnderscore.Chain<T>
-
sortBy
- Overrides:
sortBy
in classUnderscore.Chain<T>
-
sortBy
- Overrides:
sortBy
in classUnderscore.Chain<T>
-
groupBy
- Overrides:
groupBy
in classUnderscore.Chain<T>
-
groupBy
public <F> U.Chain<Map<F,Optional<T>>> groupBy(Function<T, F> func, BinaryOperator<T> binaryOperator) - Overrides:
groupBy
in classUnderscore.Chain<T>
-
indexBy
- Overrides:
indexBy
in classUnderscore.Chain<T>
-
countBy
- Overrides:
countBy
in classUnderscore.Chain<T>
-
countBy
- Overrides:
countBy
in classUnderscore.Chain<T>
-
shuffle
- Overrides:
shuffle
in classUnderscore.Chain<T>
-
sample
- Overrides:
sample
in classUnderscore.Chain<T>
-
sample
- Overrides:
sample
in classUnderscore.Chain<T>
-
tap
- Overrides:
tap
in classUnderscore.Chain<T>
-
forEach
- Overrides:
forEach
in classUnderscore.Chain<T>
-
forEachRight
- Overrides:
forEachRight
in classUnderscore.Chain<T>
-
every
- Overrides:
every
in classUnderscore.Chain<T>
-
some
- Overrides:
some
in classUnderscore.Chain<T>
-
count
- Overrides:
count
in classUnderscore.Chain<T>
-
contains
- Overrides:
contains
in classUnderscore.Chain<T>
-
containsWith
- Overrides:
containsWith
in classUnderscore.Chain<T>
-
invoke
- Overrides:
invoke
in classUnderscore.Chain<T>
-
invoke
- Overrides:
invoke
in classUnderscore.Chain<T>
-
pluck
- Overrides:
pluck
in classUnderscore.Chain<T>
-
where
- Overrides:
where
in classUnderscore.Chain<T>
-
findWhere
- Overrides:
findWhere
in classUnderscore.Chain<T>
-
uniq
- Overrides:
uniq
in classUnderscore.Chain<T>
-
uniq
- Overrides:
uniq
in classUnderscore.Chain<T>
-
distinct
- Overrides:
distinct
in classUnderscore.Chain<T>
-
distinctBy
- Overrides:
distinctBy
in classUnderscore.Chain<T>
-
union
- Overrides:
union
in classUnderscore.Chain<T>
-
intersection
- Overrides:
intersection
in classUnderscore.Chain<T>
-
difference
- Overrides:
difference
in classUnderscore.Chain<T>
-
range
- Overrides:
range
in classUnderscore.Chain<T>
-
range
- Overrides:
range
in classUnderscore.Chain<T>
-
range
- Overrides:
range
in classUnderscore.Chain<T>
-
chunk
- Overrides:
chunk
in classUnderscore.Chain<T>
-
chunk
- Overrides:
chunk
in classUnderscore.Chain<T>
-
chunkFill
- Overrides:
chunkFill
in classUnderscore.Chain<T>
-
chunkFill
- Overrides:
chunkFill
in classUnderscore.Chain<T>
-
cycle
- Overrides:
cycle
in classUnderscore.Chain<T>
-
interpose
- Overrides:
interpose
in classUnderscore.Chain<T>
-
interposeByList
- Overrides:
interposeByList
in classUnderscore.Chain<T>
-
concat
- Overrides:
concat
in classUnderscore.Chain<T>
-
slice
- Overrides:
slice
in classUnderscore.Chain<T>
-
slice
- Overrides:
slice
in classUnderscore.Chain<T>
-
set
-
set
-
reverse
- Overrides:
reverse
in classUnderscore.Chain<T>
-
join
- Overrides:
join
in classUnderscore.Chain<T>
-
join
- Overrides:
join
in classUnderscore.Chain<T>
-
skip
- Overrides:
skip
in classUnderscore.Chain<T>
-
limit
- Overrides:
limit
in classUnderscore.Chain<T>
-
toMap
- Overrides:
toMap
in classUnderscore.Chain<T>
-
drop
-
drop
-
dropRight
-
dropRight
-
dropWhile
-
dropRightWhile
-
fill
-
fill
-
flattenDeep
-
pull
-
pullAt
-
remove
-
take
-
takeRight
-
take
-
takeRight
-
takeWhile
-
takeRightWhile
-
xor
-
at
-
sum
-
sum
-
mean
-
median
-
camelCase
-
lowerFirst
-
upperFirst
-
capitalize
-
deburr
-
endsWith
-
endsWith
-
kebabCase
-
repeat
-
pad
-
pad
-
padStart
-
padStart
-
padEnd
-
padEnd
-
snakeCase
-
startCase
-
startsWith
-
startsWith
-
trim
-
trim
-
trimStart
-
trimStart
-
trimEnd
-
trunc
-
trunc
-
trimEnd
-
uncapitalize
-
words
-
toJson
-
fromJson
-
toXml
-
fromXml
-
fetch
-
fetch
-
createPermutationWithRepetition
-
toJsonJavaString
-
xmlToJson
-
jsonToXml
-