Skip to content

Adopt data structures to Java 21 changes #58

Description

@PhilippWendler

In Java 21 the collections API got some extensions, and once this project requires Java 21, we can make use of them.

Parts of this are:

  • Implement SequencedCollection.getLast() directly in PersistentLinkedList. The default implementation is unnecessarily costly (traverses the list twice).
  • Add all new modifying methods from Sequenced* to the Persistent* interfaces and mark them as deprecated and @DoNotCall.
  • Implement SequencedMap.sequenced* methods directly such that there is no need for the default implementation with its additional indirection.
  • Go through all the new interfaces and methods and check whether there are any more cases where a direct implementation makes sense.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions