Java Collections: EnumSet with Example
Java Collections: EnumSet with Example
Enumset is a special kind of Java Set which is optimized for storing enum constants. Because Java is a strongly typed language, an EnumSet stores exactly one type of enum constants. Since the universe (the range of permitted values)of enum type is always finite, an EnumSet can be optimized in ways that other Set implementations cannot be. A Java program should always use EnumSet when range of…
View On WordPress














