Get the value of enumset from Java

If you use enumset to store traditional binary values (1, 2, 4, etc.), when there are less than 64 items, I will think that this is stored as a bit vector and effectively expressed as long Is there a simple way to get this long-term value I want a quick and easy way to store the contents of a collection in a file or database

If I do this in the old way, it will only take me a long time. Despite all the problems such as type safety, I will do it myself

Solution

As far as I know, this has not been exposed You can basically rewrite it yourself – look at the enumset code to understand the code – but unfortunately there is no better way to get it:(

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>