To get the results as a tree, then PolyNode and PolyTree should be public.
When I did this, there were some NullPointerExceptions thrown from DefaultClipper. I've change some lines to prevent this:
In buildResult2:
final int cnt = (outRec.getPoints() == null) ? 0 : outRec.getPoints().getPointCount();
In fixupFirstLefts2:
if(outRec == null || outRec.firstLeft == null) continue;
In joinCommonEdges:
if (oRec.getPoints() == null || oRec.firstLeft == null || oRec.firstLeft.parseFirstLeft() != outRec1 || oRec.isHole == outRec1.isHole) {