static { classes.put2(IN, "IN"); classes.put2(CHAOS, "CHAOS"); classes.put2(HESIOD, "HESIOD"); classes.put2(NONE, "NONE"); classes.put2(ANY, "ANY"); }
public static short value(String s) { short i = (short) classes.getValue(s.toUpperCase()); if (i >= 0) return i; try { return Short.parseShort(s); } catch (Exception e) { return (-1); } }
public static String string(int i) { String s = classes.getString(i); return (s != null) ? s : new Integer(i).toString(); }