code: public void removeSamePackage (String pkg)
      {
          Iterator<String> i = _imports.iterator();
          while (i.hasNext()) {
              String name = i.next();
              if (name.startsWith(pkg) &&
                  name.indexOf('.', pkg.length() + 1) == -1) {
                      i.remove();
              }
          }
      }
docs: Remove all classes that are in the same package.
  @param pkg package to remove