示例#1
0
 @Override
 public void keyAdded(MapEvent<String, Integer> e) {
   int insertIndex =
       Collections.binarySearch(types, e.getKey(), Comparators.toStringIgnoreCaseCollator());
   if (insertIndex < 0) {
     insertIndex = -(insertIndex + 1);
   }
   types.add(insertIndex, e.getKey());
   CompanionTypeNode child = new CompanionTypeNode(e.getKey());
   insertNodeInto(child, this, insertIndex);
 }