Skip to content

model: Eliminate sorted collections #6235

@fviernau

Description

@fviernau

The use of sorted collections has been introduced with the goal of having entries serialized in some sorted order.
This approach has the pitfall that it requires

  1. Model classes to implement the Comparable interface which
    • brings in contractual requirements with equals, which in turn adds complexity to the actual compareTo implementation
    • Tightly couples the sorting of the serializer with the model class
  2. Use mutable as opposed to immutable collections
  3. The client code to deal with sorted collections

It may be possible to arrive at the original goal without implementing Comparable interface / using sorted collection.
A concrete solution is not yet known but options need to be investigated / evaluated first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    modelAbout the data model

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions