src/main/java/org/fit/layout/model/Rectangular.java
public Rectangular replaceY(Rectangular other)
    {
        Rectangular ret = new Rectangular(this);
        ret.y1 = other.y1;
        ret.y2 = other.y2;
        return ret;
    }
public Rectangular replaceY(Rectangular other)
    {
        Rectangular ret = new Rectangular(this);
        ret.y1 = other.y1;
        ret.y2 = other.y2;
        return ret;
    }
Replaces the Y coordinates of the rectangle with the Y coordinates of another one.
@param other the rectangle whose Y coordinates will be used
@return the resulting rectangle