I\'ve an enum like this:
public enum PcapLinkType { DLT_NULL(0) DLT_EN10MB(1) DLT_EN3MB(2), DLT_AX25(3), /*snip, 200 more enums, not always consecu
As @MeBigFatGuy says, except you can make your static {...} block use a loop over the values() collection:
static {...}
values()
static { for (PcapLinkType type : PcapLinkType.values()) { intToTypeMap.put(type.getValue(), type); } }