This release focus on the Array
handling for the "extension" methods as well as new methods take
/ drop
There is new ideas coming from Kotlin
this time.
Some internal looping have been restructured to maybe help the efficiency.
Some bugs were fixed when a Set
was being received in hasAll
and hasOne
.
Breaking changes
The 3rd argument that is a limit
was too ambiguous depending on the implementation. It was either from the end or the start of the collection without any control over the direction. In replacement, the new methods take
and drop
are there to give the functionality.
Changes in the CollectionHolder
The type safety has been re-though and to have unknown
is the least safe way to handle the values.
With that, the deprecation of all the parameters unknown
are deprecated to be removed in the next version (1.11
)
All of the changes from 1.9
are applied:
- No more variadic parameters in
has
/includes
/contains
- No more variadic parameters in
hasOne
/includesOne
/containsOne
- No more variadic parameters in
hasAll
/includesAll
/containsAll
New methods are added.
Which includes the alias some
→ any
and every
→ all
.
And the methods
take
, takeWhile
, takeWhileIndexed
, takeLast
, takeLastWhile
, takeLastWhileIndexed
,
drop
, dropWhile
, dropWhileIndexed
, dropLast
, dropLastWhile
and dropLastWhileIndexed
.
Deprecation of methods with unknown
in a parameter:
has
/includes
/contains
hasOne
/includesOne
/containsOne
hasAll
/includesAll
/containsAll
indexOf
lastIndexOf
Deprecation of methods with limit
as the 3rd or 4th (last) parameter (it is only to remove the limit
):
indexOf
lastIndexOf
indexOfFirst
indexOfFirstIndexed
indexOLast
indexOfLastIndexed
slice
toReverse
/toReversed
/reversed
Changes in the CollectionHolder
extension methods
Only the duplicated methods or no longer useful methods are to be removed in the version 1.11
objectValuesMap
(since a restriction is applied to thetoWeakSet
methodssliceByCollectionHolderWithSet(it should be replaced withsliceWithSetByCollectionHolder
)- New method
isEmpty
- New method
isNotEmpty
- New utility method
isIterator
Changes in CollectionConstants
Since there is a new Iterator
present in Javascript, the constant ITERATOR_MEMBERS
will change. It should now be COLLECTION_ITERATOR_MEMBERS
to remain the same as in the version 1.9
.
There is also a new value EMPTY_WEAK_MAP
.