private void addCategory(Categorized category){
  Iterator<String> names=category.getCategoryNames();
  while (names.hasNext()) {
    categories.put(names.next(),category);
  }
}

private void addCategory ( Categorized category ) { Iterator < String > names = category . getCategoryNames ( ) ; while ( names . hasNext ( ) ) { categories . put ( names . next ( ) , category ) ; } }
helper function to file away new categories . it adds one entry in the map for each sub - category in the passed category .
