users@jaxb.java.net

inefficient typesafe enumeration

From: Sean Rohead <sean.rohead_at_usa.net>
Date: Fri, 14 Feb 2003 12:24:01 -0700

I've noticed that the implementation of parse(String str) is just a giant sequence of if-statements. This seems horribly inefficient when the set of values in the enumeration is large. Would it be possible to implement this using a statically initialized HashMap when there are more than a dozen or so entries?