// Path: src/main/java/com/github/ferstl/maven/pomenforcers/util/CommaSeparatorUtils.java
// public final class CommaSeparatorUtils {
// 
//   private static final Splitter COMMA_SPLITTER = Splitter.on(",").trimResults().omitEmptyStrings();
// 
//   public static void splitAndAddToCollection(String commaSeparatedItems, Collection<String> collection) {
//     splitAndAddToCollection(commaSeparatedItems, collection, Function.identity());
//   }
// 
//   public static <T> void splitAndAddToCollection(String commaSeparatedItems, Collection<T> collection, Function<String, T> transformer) {
//     Iterable<String> items = COMMA_SPLITTER.split(commaSeparatedItems);
//     // Don't touch the collection if there is nothing to add.
//     if (items.iterator().hasNext()) {
//       collection.clear();
//     }
//     StreamSupport.stream(items.spliterator(), false)
//         .map(transformer)
//         .collect(toCollection(() -> collection));
//   }
// 
// }


import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import com.github.ferstl.maven.pomenforcers.util.CommaSeparatorUtils;
import com.google.common.base.Strings;
import com.google.common.collect.Sets;

  /**
   * See {@link PedanticPluginElementEnforcer#checkPlugins}.
   *
   * @configParam
   * @since 2.0.0
   */
  private Boolean checkPluginElements;

  /**
   * See {@link PedanticPluginElementEnforcer#checkPluginManagement}.
   *
   * @configParam
   * @since 2.0.0
   */
  private Boolean checkPluginManagementElements;

  /**
   * Collection of enforcers to execute.
   */
  private final Collection<PedanticEnforcerRule> enforcers;

  private final PropertyInitializationVisitor propertyInitializer;

  public CompoundPedanticEnforcer() {
    this.enforcers = Sets.newLinkedHashSet();
    this.propertyInitializer = new PropertyInitializationVisitor();
  }

  public void setEnforcers(String enforcers) {
// Path: src/main/java/com/github/ferstl/maven/pomenforcers/util/CommaSeparatorUtils.java
// public final class CommaSeparatorUtils {
// 
//   private static final Splitter COMMA_SPLITTER = Splitter.on(",").trimResults().omitEmptyStrings();
// 
//   public static void splitAndAddToCollection(String commaSeparatedItems, Collection<String> collection) {
//     splitAndAddToCollection(commaSeparatedItems, collection, Function.identity());
//   }
// 
//   public static <T> void splitAndAddToCollection(String commaSeparatedItems, Collection<T> collection, Function<String, T> transformer) {
//     Iterable<String> items = COMMA_SPLITTER.split(commaSeparatedItems);
//     // Don't touch the collection if there is nothing to add.
//     if (items.iterator().hasNext()) {
//       collection.clear();
//     }
//     StreamSupport.stream(items.spliterator(), false)
//         .map(transformer)
//         .collect(toCollection(() -> collection));
//   }
// 
// }


// Path: src/main/java/com/github/ferstl/maven/pomenforcers/CompoundPedanticEnforcer.java
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import com.github.ferstl.maven.pomenforcers.util.CommaSeparatorUtils;
import com.google.common.base.Strings;
import com.google.common.collect.Sets;


  /**
   * See {@link PedanticPluginElementEnforcer#checkPlugins}.
   *
   * @configParam
   * @since 2.0.0
   */
  private Boolean checkPluginElements;

  /**
   * See {@link PedanticPluginElementEnforcer#checkPluginManagement}.
   *
   * @configParam
   * @since 2.0.0
   */
  private Boolean checkPluginManagementElements;

  /**
   * Collection of enforcers to execute.
   */
  private final Collection<PedanticEnforcerRule> enforcers;

  private final PropertyInitializationVisitor propertyInitializer;

  public CompoundPedanticEnforcer() {
    this.enforcers = Sets.newLinkedHashSet();
    this.propertyInitializer = new PropertyInitializationVisitor();
  }

  public void setEnforcers(String enforcers) {
    CommaSeparatorUtils.splitAndAddToCollection(enforcers, this.enforcers, PedanticEnforcerRule::valueOf);