I have the following example:
import java.util.EnumSet; import java.util.Iterator; public class SizeSet { public static void main(String[] args) {
According to Oracle doc
Enum sets are represented internally as bit vectors. This representation is extremely compact and efficient.
Readable, type safe, low memory footprint... What do you want more?