code: public void removeAll(Class<? extends ProcessListener> type) {
      for (Iterator<ProcessListener> it = children.iterator(); it.hasNext();) {
        if (type.isInstance(it.next()))
          it.remove();
      }
    }
docs: Remove existing listeners of given type or its sub-types.
  
  @param type listener type.