Code example for BrokenBarrierException

Methods: printStackTrace

0
        } 
        catch (InterruptedException ie) {
            ie.printStackTrace();
        } 
        catch (BrokenBarrierException bbe) {
            bbe.printStackTrace();
        } 
    } 
 
    public void insertWord(String str, int id, NameIdsDict dict) {
        List<Integer> ids = null;
        str = str.trim();
        // 繁体字转成简体字,小写字母转成大写字母 
        str = Trad2Simp.convert(str).toUpperCase();
        if (!(dict.containsKey(str))) {
            ids = new ArrayList<Integer>();
        } 
        else { 
            ids = dict.get(str);
        } 
        ids.add(id);