private DictIndex0Item getItem(char c) { // if none in map, put a new one Character cr = new Character(Character.toUpperCase(c)); DictIndex0Item child = (DictIndex0Item) childrenItemMap.get(cr); if (child == null) { child = new DictIndex0Item(); child.setChar(c); childrenItemMap.put(cr, child); } return child; }
public static void main(String[] args) { DictIndex0Item root = new DictIndex0Item(); root.minwords = 1; root.setChar((char) 0); root.addBranchPath("A", 0x00); root.addBranchPath("AC", 0x10); root.addBranchPath("ACH", 0x20); root.addBranchPath("AD", 0x30); root.addBranchPath("ADG", 0x40); root.addBranchPath("B", 0x50); root.addBranchPath("BE", 0x60); root.addBranchPath("BF", 0x70); root.addBranchPath("BFI", 0x80); root.addBranchPath("T", 0x90); root.addBranchPath("TI", 0xa0); root.prepare(); root.debug(); }