code: private void removeEntriesStartingWith(String key) {
          synchronized (eventMap) {
              Iterator<String> iter = eventMap.keySet().iterator();
              while (iter.hasNext()) {
                  String str = iter.next();
                  if (str.startsWith(key)) {
                      iter.remove();
                  }
              }
          }
      }
docs: Remove all entries starting with the given key
  
  @param key