hashmap - Storing hex values in a map .. java? -


i doing this.. gets stored integer.. how can it?

commandmap = new hashmap();
commandmap.put("set_display", 0xd0);
commandmap.put("read_adc", 0xd1);
commandmap.put("get_param", 0xd2);
commandmap.put("set_param", 0xd3);
commandmap.put("get_iovalue", 0xd4);
commandmap.put("set_iovalue", 0xd5);

decimal, hex, octal , on notations; i.e. different ways of rendering integer in characters. not special kinds of numbers.

so ...

commandmap = new hashmap();  commandmap.put("set_display", 0xd0); int value = commandmap.get("set_display"); system.err.println("0x" + integer.tohexstring(value)); 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -