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 TypeMethodDescriptionassociateBy(Function<T, F> func) chunk(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) 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) 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 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:
firstin classUnderscore.Chain<T>
-
first
- Overrides:
firstin classUnderscore.Chain<T>
-
firstOrNull
- Overrides:
firstOrNullin classUnderscore.Chain<T>
-
firstOrNull
- Overrides:
firstOrNullin classUnderscore.Chain<T>
-
initial
- Overrides:
initialin classUnderscore.Chain<T>
-
initial
- Overrides:
initialin classUnderscore.Chain<T>
-
last
- Overrides:
lastin classUnderscore.Chain<T>
-
last
- Overrides:
lastin classUnderscore.Chain<T>
-
lastOrNull
- Overrides:
lastOrNullin classUnderscore.Chain<T>
-
lastOrNull
- Overrides:
lastOrNullin classUnderscore.Chain<T>
-
rest
- Overrides:
restin classUnderscore.Chain<T>
-
rest
- Overrides:
restin classUnderscore.Chain<T>
-
compact
- Overrides:
compactin classUnderscore.Chain<T>
-
compact
-
flatten
- Overrides:
flattenin classUnderscore.Chain<T>
-
map
-
mapMulti
- Overrides:
mapMultiin classUnderscore.Chain<T>
-
mapIndexed
- Overrides:
mapIndexedin classUnderscore.Chain<T>
-
filter
-
filterIndexed
- Overrides:
filterIndexedin classUnderscore.Chain<T>
-
rejectIndexed
- Overrides:
rejectIndexedin classUnderscore.Chain<T>
-
reject
-
filterFalse
- Overrides:
filterFalsein classUnderscore.Chain<T>
-
reduce
- Overrides:
reducein classUnderscore.Chain<T>
-
reduce
- Overrides:
reducein classUnderscore.Chain<T>
-
reduceRight
- Overrides:
reduceRightin classUnderscore.Chain<T>
-
reduceRight
- Overrides:
reduceRightin classUnderscore.Chain<T>
-
find
-
findLast
-
max
- Overrides:
maxin classUnderscore.Chain<T>
-
max
- Overrides:
maxin classUnderscore.Chain<T>
-
min
- Overrides:
minin classUnderscore.Chain<T>
-
min
- Overrides:
minin classUnderscore.Chain<T>
-
sort
- Overrides:
sortin classUnderscore.Chain<T>
-
sortWith
- Overrides:
sortWithin classUnderscore.Chain<T>
-
sortBy
- Overrides:
sortByin classUnderscore.Chain<T>
-
sortBy
- Overrides:
sortByin classUnderscore.Chain<T>
-
groupBy
-
associateBy
- Overrides:
associateByin classUnderscore.Chain<T>
-
groupBy
-
indexBy
-
countBy
-
countBy
-
shuffle
- Overrides:
shufflein classUnderscore.Chain<T>
-
sample
- Overrides:
samplein classUnderscore.Chain<T>
-
sample
- Overrides:
samplein classUnderscore.Chain<T>
-
tap
-
forEach
-
forEachRight
- Overrides:
forEachRightin classUnderscore.Chain<T>
-
every
-
some
-
count
-
contains
-
containsWith
- Overrides:
containsWithin classUnderscore.Chain<T>
-
invoke
-
invoke
-
pluck
-
where
-
findWhere
-
uniq
- Overrides:
uniqin classUnderscore.Chain<T>
-
uniq
-
distinct
- Overrides:
distinctin classUnderscore.Chain<T>
-
distinctBy
- Overrides:
distinctByin classUnderscore.Chain<T>
-
union
-
intersection
- Overrides:
intersectionin classUnderscore.Chain<T>
-
difference
- Overrides:
differencein classUnderscore.Chain<T>
-
range
- Overrides:
rangein classUnderscore.Chain<T>
-
range
- Overrides:
rangein classUnderscore.Chain<T>
-
range
- Overrides:
rangein classUnderscore.Chain<T>
-
chunk
-
chunk
-
chunkFill
-
chunkFill
-
cycle
- Overrides:
cyclein classUnderscore.Chain<T>
-
interpose
-
interposeByList
- Overrides:
interposeByListin classUnderscore.Chain<T>
-
concat
-
slice
- Overrides:
slicein classUnderscore.Chain<T>
-
slice
- Overrides:
slicein classUnderscore.Chain<T>
-
set
-
set
-
reverse
- Overrides:
reversein classUnderscore.Chain<T>
-
join
- Overrides:
joinin classUnderscore.Chain<T>
-
join
-
skip
- Overrides:
skipin classUnderscore.Chain<T>
-
limit
- Overrides:
limitin classUnderscore.Chain<T>
-
toMap
- Overrides:
toMapin 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
-
xmlToJson
-
jsonToXml
-