jaguar_serializer icon indicating copy to clipboard operation
jaguar_serializer copied to clipboard

Immutable list

Open jaumard opened this issue 4 years ago • 2 comments

When deserialization is done and model contains list, they should be immutable (meaning use growable:false) to prevent miss usage add allow add/remove items into those list.

jaumard avatar Sep 08 '19 08:09 jaumard

What about the cases when you want to work on top of the list ?

keshava19 avatar Oct 01 '19 22:10 keshava19

If models are annotated with @immutable it means we want immutable models so everything should be immutable not only final fields. People who doesn't want immutable would be able to work on top of the list like this. Or you can still create a list from the immutable one if you want to

jaumard avatar Oct 02 '19 05:10 jaumard