Version 2.1.0
This version focuses on usability improvements in the API.
New features in this release:
- Adds new lambda friendly methods to IterableStreamable (base interface for all collections as well as views returned by methods such as
keys(),entries(), andvalues().count(): Returns total number of elements.count(p): Returns total number of elements for which Predicatepreturns true.allMatch(p): Returns true if Predicatepreturns true for all elements.anyMatch(p): Returns true if Predicatepreturns true for any element.first(p): Returns Holder containing first element for which Predicatepreturns true, otherwise returns empty Holder.collect(c): Adds all elements to Insertablec.collect(n,c): Adds firstnelements to Insertablec`.collect(c,p): Adds all elements for which Predicatepreturns true to Insertablec.collect(n,c,p): Adds firstnelements for which Predicatepreturns true to Insertablec.transform(c,t): Adds result of calling Func1tfor every element to Insertablec.transform(n,c,t): Adds result of calling Func1tfor firstnelements to Insertablec.transformSome(c,t): Same astransform(c,t)excepttreturns a Holder and only the contents of non-empty Holders are added toc.transformSome(n,c,t): Same astransform(n,c,t)excepttreturns a Holder and only the contents of non-empty Holders are added toc.partition(m,u,p): Adds every element to eithermoru. All elements for whichpreturns true are added tomand all others are added tou.reduce(f): Callsffor every element and returns final result.
- Fixes
insertAll()methods that previously returnedInsertableinstead of the class the method belonged to. - Adds more
insertAll()variants toInsertable. - Refactors multi-value methods like
insertAll(),deleteAll(), etc to useIterableinstead ofCursorable. Variants takingCursorare still provided but the refactoring allows the library to default to using lower overheadIteratorsinstead. - Adds
select()andreject()methods to JImmutableSet working the same way as those on JImmutableList.