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.
First cut is checked in. Used readObject() for some validations, though haven't made hard guarantees about uniqueness, since this may slow things down.
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.
Could even use proxy objects and feed everything back through the builder on deserialization, though this gets complicated when we have collections inside collections.