private boolean touchHorizontally(Line first, Line second) {
        Point fEnd = first.getEnd();
        Point sEnd = second.getEnd();

        if (fEnd.getY() != sEnd.getY()) {
            return false;
        }

        Point fStart = first.getStart();
        Point sStart = second.getStart();

        if ((fStart.getX() <= sStart.getX() && fEnd.getX() >= sStart.getX() && fEnd.distanceTo(sStart) != 0)
                    ||
            fStart.getX() >= sStart.getX() && fEnd.getX() <= sEnd.getX() && sEnd.distanceTo(fStart) != 0)

        {
            return  true;
        }

        return false;


    }