// Path: sorter/src/main/java/sortpom/parameter/DependencySortOrder.java
// public class DependencySortOrder {
//     private final String childElementNameList;
//     private Collection<String> childElementNames;
// 
//     /**
//      * Create an instance of the DependencySortOrder
//      *
//      * @param childElementNameList the plugin parameter argument
//      */
//     public DependencySortOrder(String childElementNameList) {
//         this.childElementNameList = childElementNameList == null ? "" : childElementNameList;
//     }
// 
//     /**
//      * Gets a list of which elements the dependencies should be sorted after. Example:
//      * If the list returns "scope, groupId" then the dependencies should be sorted first by scope and then by
//      * groupId.
//      *
//      * @return a list of xml element names
//      */
//     public Collection<String> getChildElementNames() {
//         if (childElementNames == null) {
//             childElementNames = Collections.unmodifiableList(Arrays.asList(parseChildElementNameList()));
//         }
//         return childElementNames;
//     }
// 
//     private String[] parseChildElementNameList() {
//         String list = childElementNameList.replaceAll("\\s", "");
//         if (list.isEmpty()) {
//             return new String[0];
//         }
//         return list.split("[;,:]");
//     }
// 
//     /** Earlier versions only accepted the values 'true' and 'false' as parameter values */
//     public boolean isDeprecatedValueTrue() {
//         return "true".equalsIgnoreCase(childElementNameList);
//     }
// 
//     /** Earlier versions only accepted the values 'true' and 'false' as parameter values */
//     public boolean isDeprecatedValueFalse() {
//         return "false".equalsIgnoreCase(childElementNameList);
//     }
// 
//     /** If the dependencies should be unsorted */
//     public boolean isNoSorting() {
//         return getChildElementNames().isEmpty();
//     }
// 
//     @Override
//     public String toString() {
//         return "DependencySortOrder{" +
//                 "childElementNames=" + getChildElementNames() +
//                 '}';
//     }
// }


import org.jdom.Content;
import org.jdom.Element;
import sortpom.parameter.DependencySortOrder;
import java.util.List;
package sortpom.wrapper.content;



/**
 * A wrapper that contains a plugin element. The element is sorted according to a predetermined order.
 *
 * @author Bjorn Ekryd
 */
public class PluginSortedWrapper extends SortedWrapper {
    private ChildElementSorter childElementSorter = ChildElementSorter.EMPTY_SORTER;

    /**
     * Instantiates a new child element sorted wrapper with a plugin element.
     *
     * @param element   the element
     * @param sortOrder the sort order
     */
    public PluginSortedWrapper(final Element element, final int sortOrder) {
        super(element, sortOrder);
    }

    @SuppressWarnings("unchecked")
    public void setSortOrder(DependencySortOrder dependencySortOrder) {
        List<Element> children = getContent().getChildren();
        this.childElementSorter = new ChildElementSorter(dependencySortOrder, children);
        childElementSorter.emptyGroupIdIsFilledWithDefaultMavenGroupId();
    }

// Path: sorter/src/main/java/sortpom/parameter/DependencySortOrder.java
// public class DependencySortOrder {
//     private final String childElementNameList;
//     private Collection<String> childElementNames;
// 
//     /**
//      * Create an instance of the DependencySortOrder
//      *
//      * @param childElementNameList the plugin parameter argument
//      */
//     public DependencySortOrder(String childElementNameList) {
//         this.childElementNameList = childElementNameList == null ? "" : childElementNameList;
//     }
// 
//     /**
//      * Gets a list of which elements the dependencies should be sorted after. Example:
//      * If the list returns "scope, groupId" then the dependencies should be sorted first by scope and then by
//      * groupId.
//      *
//      * @return a list of xml element names
//      */
//     public Collection<String> getChildElementNames() {
//         if (childElementNames == null) {
//             childElementNames = Collections.unmodifiableList(Arrays.asList(parseChildElementNameList()));
//         }
//         return childElementNames;
//     }
// 
//     private String[] parseChildElementNameList() {
//         String list = childElementNameList.replaceAll("\\s", "");
//         if (list.isEmpty()) {
//             return new String[0];
//         }
//         return list.split("[;,:]");
//     }
// 
//     /** Earlier versions only accepted the values 'true' and 'false' as parameter values */
//     public boolean isDeprecatedValueTrue() {
//         return "true".equalsIgnoreCase(childElementNameList);
//     }
// 
//     /** Earlier versions only accepted the values 'true' and 'false' as parameter values */
//     public boolean isDeprecatedValueFalse() {
//         return "false".equalsIgnoreCase(childElementNameList);
//     }
// 
//     /** If the dependencies should be unsorted */
//     public boolean isNoSorting() {
//         return getChildElementNames().isEmpty();
//     }
// 
//     @Override
//     public String toString() {
//         return "DependencySortOrder{" +
//                 "childElementNames=" + getChildElementNames() +
//                 '}';
//     }
// }


// Path: sorter/src/main/java/sortpom/wrapper/content/PluginSortedWrapper.java
import org.jdom.Content;
import org.jdom.Element;
import sortpom.parameter.DependencySortOrder;
import java.util.List;

package sortpom.wrapper.content;



/**
 * A wrapper that contains a plugin element. The element is sorted according to a predetermined order.
 *
 * @author Bjorn Ekryd
 */
public class PluginSortedWrapper extends SortedWrapper {
    private ChildElementSorter childElementSorter = ChildElementSorter.EMPTY_SORTER;

    /**
     * Instantiates a new child element sorted wrapper with a plugin element.
     *
     * @param element   the element
     * @param sortOrder the sort order
     */
    public PluginSortedWrapper(final Element element, final int sortOrder) {
        super(element, sortOrder);
    }

    @SuppressWarnings("unchecked")
    public void setSortOrder(DependencySortOrder dependencySortOrder) {
        List<Element> children = getContent().getChildren();
        this.childElementSorter = new ChildElementSorter(dependencySortOrder, children);
        childElementSorter.emptyGroupIdIsFilledWithDefaultMavenGroupId();
    }

    @Override