This is the project home for EnumBitSet. It's a small project offering more functionality with enum types in Java.
Java 8 is needed to use any of the code!!
Do you know this situation:
You have created some enum types in Java and now you want
to use them but you don't know how to store them in a database?
Hibernate and JPA can help you but ORM isn't always the best approach.
Maybe you just want to have more control on how the data is stored to
EnumBitSet can help you working with sets of enum constants and storing those sets in one single database field. Just use the method
toLong() if you are sure that there
are not more than 64 elements in the enum type.
toBigInteger() for enum types of any size.
This library also offers a more general interface to bit sets that are restricted by a domain (universe). Three implementations exist:
The project is hosted on Google Code: http://code.google.com/p/java8-enum-bit-set/
Use this command to anonymously check out the latest project source code:
$ svn checkout http://java8-enum-bit-set.googlecode.com/svn/trunk/EnumBitSet/ java8-enum-bit-set-read-only
Download as JAR: EnumBitSet.jar
Collection. So it's use is familiar.
Example code can be found in the project summary and in the javadoc.
Well, I won't sue you. But if you use this and claim it's yours then you are stupid and I will tell your mother.
You can't sue me because the code is so simple that it just couldn't violate any patents. And the code is provided "as is" — without any guarantees.
A copy of the MIT license is in the project.
Note: This might be out of date but you can generate this from the source using the ANT build file.
About the author: Home Page
Check out my other project: Java Cleanup
I also have some quite interesting and educational code on pastebin: pastebin.com/u/DulcetAirman