Skip to content

Serialization of built Map and Set implementations #1

@run2000

Description

@run2000

The convention in Java collections has been to implement serialization on all collections. Should do this on this codebase as well.

Probably want a judicious use of transient, writeObject, readObject to avoid serializing technically redundant information, and validating deserialized data, for instance the null comparators, and the empty set/empty map instances.

  • Validate uniqueness of keys in all maps and sets
  • Validate uniqueness of values in bimap instances.
  • In the ordered set and ordered map classes, validate existing ordering when deserialized.
  • In the hashed set and hashed map classes, regenerate the hashcodes when deserialized.

Could even use proxy objects and feed everything back through the builder on deserialization, though this gets complicated when we have collections inside collections.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions