Skip to content

Version 3.0.0

Choose a tag to compare

@brianburton brianburton released this 14 Sep 15:43
· 333 commits to master since this release

This release includes some major improvements including:

  • All streams can split evenly down to collections of approximately 32 values each. In previous releases splitting was collection dependent and relatively limited. This greatly improves support for parallel streams.
  • JImmutableList provides full support for insertion and removal at any index within the list. In previous releases only JImmutableRandomAccessLists had this feature.
  • JImmutableMaps have lower memory footprints than in previous releases.
  • JImmutableList supports efficiently taking a sublist.
    • The prefix() method returns a list consisting of the n elements from the beginning of the list.
    • The suffix() method returns a list consisting of the n elements from the end of the list.
    • The middle() method returns a list consisting of the elements from any two indices in the list.
    • The slice() method is like the middle() method except it supports python style negative indexing and is forgiving of indexes past the end of the list.
  • Builder classes have been added for JImmutableMap instances. For hash and sorted maps these builders are highly efficient and thread safe. For insert order maps the builder is just sugar over normal assign method calls.
  • Builder classes have been added for JImmutableSet instances. For hash and sorted sets these builders are highly efficient and thread safe. For insert order sets the builder is just sugar over normal insert method calls.
  • New forEach() and reduce() methods have been added for maps to eliminate the need for passing an Entry().
  • The Cursor class has been removed. Cursors are incompatible with Streams and have higher overhead than Iterators so it was best to simplify the code base by removing them.
  • The JImmutableRandomAccessList class has been removed. Having two list classes (especially one with such a long name) was difficult and its special features were moved into JImmutableList. The new JImmutableList implementation has much better performance than the old JImmutableRandomAccessList while supporting all of the same features.
  • Many other minor improvements.

Developer's Notes

Maven Coordinates

    <dependency>
      <groupId>org.javimmutable</groupId>
      <artifactId>javimmutable-collections</artifactId>
      <version>3.0.0</version>
    </dependency>