github daniel-rusu/pods4k v0.4.0
0.4.0

latest releases: v0.7.0, v0.6.0, v0.5.0...
12 months ago

Immutable Arrays

Breaking Changes:

  • Extracted the asList method to an extension function and replaced the previous implementation, which delegated to
    the asList function on the backing array, with a custom list implementation that's guaranteed to always be
    immutable. This was necessary because the Kotlin standard library Array<T>.asList extension function doesn't
    guarantee immutability via the wrapper list that it returns.
  • Renamed the specializations package to multiplicativeSpecializations to better reflect its contents. These
    specializations are generated by multiplying all combinations of base types and using the most efficient resulting
    type for each combination. There are hundreds of regular non-multiplicative specializations so this updated name stops
    implying that these are the only specializations that exist.

New Features:

  • Add Collection.removeAll(immutableArray) extension function
  • Add Collection.containsAll(immutableArray) extension function
  • Add toHashSet extension function
  • Add toMutableSet extension function
  • Add toSet extension function
  • Add flatMapIndexed specializations for flattening immutable arrays
  • Add flatMap specializations for flattening immutable arrays
  • Add requireNoNulls extension function
  • Add indexOfLast(predicate) method
  • Add indexOfFirst(predicate) method
  • Add joinToString method
  • Add lastIndexOf(element) extension function
  • Add addAll(sequence) to the immutable array builders
  • Add indexOf(element) extension function
  • Add contains operator

Performance Improvements:

  • When converting iterables or sequences to immutable arrays, use immutable array builders instead of accumulating the
    values in a temporary list as that's much more efficient.

Don't miss a new pods4k release

NewReleases is sending notifications on new releases.