// Path: CutletLib/src/main/java/com/cutlet/lib/model/Dimension.java
// @ToString
// public class Dimension implements Serializable{
// 
//     private double length;
//     private double width;
// 
//     public Dimension(final double length, final double width) {
//         this.length = length;
//         this.width = width;
//     }
// 
//     public double getLength() {
//         return length;
//     }
// 
//     public void setLength(final double length) {
//         this.length = length;
//     }
// 
//     public double getWidth() {
//         return width;
//     }
// 
//     public void setWidth(final double width) {
//         this.width = width;
//     }
// 
//     public double getArea() {
//         return getLength() * getWidth();
//     }
// 
//     public boolean canHold(@NonNull final Dimension other) {
//         return other.getLength() <= this.getLength() && other.getWidth() <= this.getWidth();
//     }    
//     
//     public Dimension rotated() {
//         return new Dimension(width, length);
//     }
// }


import lombok.NonNull;
import com.cutlet.lib.model.Dimension;
import java.io.Serializable;

/*
 * Copyright (C) 2017 rudolf.muehlbauer@gmail.com
 */

package com.cutlet.lib.data.cuttree;


/**
 *
 * @author rmuehlba
 */
public class RootNode implements CutTreeNode, Serializable {
    private CutTreeNode child;
    private Dimension dimension;

    public RootNode(@NonNull final Dimension dimension) {
        this.dimension = dimension;
    }
    
    public CutTreeNode getChild() {
        return child;
    }

    public void setChild(@NonNull final CutTreeNode child) {
        this.child = child;
    }

    @Override

// Path: CutletLib/src/main/java/com/cutlet/lib/model/Dimension.java
// @ToString
// public class Dimension implements Serializable{
// 
//     private double length;
//     private double width;
// 
//     public Dimension(final double length, final double width) {
//         this.length = length;
//         this.width = width;
//     }
// 
//     public double getLength() {
//         return length;
//     }
// 
//     public void setLength(final double length) {
//         this.length = length;
//     }
// 
//     public double getWidth() {
//         return width;
//     }
// 
//     public void setWidth(final double width) {
//         this.width = width;
//     }
// 
//     public double getArea() {
//         return getLength() * getWidth();
//     }
// 
//     public boolean canHold(@NonNull final Dimension other) {
//         return other.getLength() <= this.getLength() && other.getWidth() <= this.getWidth();
//     }    
//     
//     public Dimension rotated() {
//         return new Dimension(width, length);
//     }
// }


// Path: CutletLib/src/main/java/com/cutlet/lib/data/cuttree/RootNode.java
import lombok.NonNull;
import com.cutlet.lib.model.Dimension;
import java.io.Serializable;

/*
 * Copyright (C) 2017 rudolf.muehlbauer@gmail.com
 */

package com.cutlet.lib.data.cuttree;


/**
 *
 * @author rmuehlba
 */
public class RootNode implements CutTreeNode, Serializable {
    private CutTreeNode child;
    private Dimension dimension;

    public RootNode(@NonNull final Dimension dimension) {
        this.dimension = dimension;
    }
    
    public CutTreeNode getChild() {
        return child;
    }

    public void setChild(@NonNull final CutTreeNode child) {
        this.child = child;
    }

    @Override

    public void replaceChild(@NonNull final CutTreeNode from, @NonNull final CutTreeNode to) {
