// Path: kendzi-straight-skeleton/src/main/java/kendzi/math/geometry/skeleton/utils/ValidateUtil.java
// public class ValidateUtil {
//     public static void validateNotNull(Object obj, String msg) {
//         if (obj == null) {
//             throw new IllegalStateException("object can't be null: " + msg);
//         }
//     }
// 
//     public static void validateNull(Object obj, String msg) {
//         if (obj != null) {
//             throw new IllegalStateException("object should be null: " + msg);
//         }
//     }
// 
// }


import kendzi.math.geometry.skeleton.utils.ValidateUtil;
package kendzi.math.geometry.skeleton.path;


/**
 * Util for face queue.
 * 
 * @author Tomasz Kedziora (Kendzi)
 * 
 */
public class FaceQueueUtil {

    private FaceQueueUtil() {
        //
    }

    /**
     * Connect two nodes queue. Id both nodes comes from the same queue, queue
     * is closed. If nodes are from different queues nodes are moved to one of
     * them.
     * 
     * @param firstFace
     *            first face queue
     * @param secondFace
     *            second face queue
     */
    public static void connectQueues(FaceNode firstFace, FaceNode secondFace) {

        ValidateUtil.validateNotNull(firstFace.list(), "firstFace.list");
// Path: kendzi-straight-skeleton/src/main/java/kendzi/math/geometry/skeleton/utils/ValidateUtil.java
// public class ValidateUtil {
//     public static void validateNotNull(Object obj, String msg) {
//         if (obj == null) {
//             throw new IllegalStateException("object can't be null: " + msg);
//         }
//     }
// 
//     public static void validateNull(Object obj, String msg) {
//         if (obj != null) {
//             throw new IllegalStateException("object should be null: " + msg);
//         }
//     }
// 
// }


// Path: kendzi-straight-skeleton/src/main/java/kendzi/math/geometry/skeleton/path/FaceQueueUtil.java
import kendzi.math.geometry.skeleton.utils.ValidateUtil;

package kendzi.math.geometry.skeleton.path;


/**
 * Util for face queue.
 * 
 * @author Tomasz Kedziora (Kendzi)
 * 
 */
public class FaceQueueUtil {

    private FaceQueueUtil() {
        //
    }

    /**
     * Connect two nodes queue. Id both nodes comes from the same queue, queue
     * is closed. If nodes are from different queues nodes are moved to one of
     * them.
     * 
     * @param firstFace
     *            first face queue
     * @param secondFace
     *            second face queue
     */
    public static void connectQueues(FaceNode firstFace, FaceNode secondFace) {

        ValidateUtil.validateNotNull(firstFace.list(), "firstFace.list");
        ValidateUtil.validateNotNull(secondFace.list(), "secondFace.list");