Open lsoares opened 8 years ago
Are there any new on this issue?
@lsoares, why mark @Singular emum fields? Docs lombok:
@Singular can only be applied to collection types known to lombok. Currently, the supported types are
@lsoares, why mark @Singular emum fields?
@danilovEY: I'm referring to EnumSet
; not to enum fields.
@lsoares, Hm... Although yes, it will be very useful to add support EnumSet. Just a lot of people use List or HashSet for enum type but this is a bad.
Indeed. EnumSet is optimized for enums. But if nobody uses it, it may not be worth to add more code to Lombok.
I think it is not hard add this feature. Just add in handle of Singular annotation where check of null field and edit code when create instance object for Set type (replace example like this: EnumSet.noneOf(T.class))
great. let's hope they'll do it. or are you proposing that I do a PR?
If you can do this, will try and may be they accept your pull request :) Because tasks they have and so many.
EnumMap would be helpful as well.
As
Set
is supported by @Singular annotation, I suggestEnumSet
to be as well. Do you agree? thx