code: private void add(String packages) {
      if (packages != null) {
        String[] split = packages.split(",|;| ");
        for (int i = 0; i < split.length; i++) {
          String pkg = split[i].trim();
          if (!pkg.isEmpty()) {
            packageSet.add(pkg);
          }
        }
      }
    }
docs: Collect each individual package splitting by delimiters.