Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.HashMap; import java.util.Map; public class Main { static Map intToString = new HashMap(); static Map stringToInt = new HashMap(); static void add(int color, String name) { Integer c = new Integer(color); intToString.put(c, name); stringToInt.put(name, c); } }