compiler: allow indent to take generators
compiler: java: implement compareTo
compiler: java: handle null in compareTo