Performance tests showed that the HasMap is faster then switch even thought autoboxing is involved