Minor: better formatting in code generator.

This commit is contained in:
Evgeny Gerashchenko
2012-08-09 13:58:05 +04:00
parent 8084876fed
commit 1656f38f6f
+3 -3
View File
@@ -378,16 +378,16 @@ public class Ranges {
if (resType.equals("FloatRange") || resType.equals("DoubleRange")) { if (resType.equals("FloatRange") || resType.equals("DoubleRange")) {
System.out.println("\npublic static " + resType + " rangeTo(" + t1 + " from, " + t2 + " to) {\n" + System.out.println("\npublic static " + resType + " rangeTo(" + t1 + " from, " + t2 + " to) {\n" +
" return new " + resType + "(from, to-from);\n" + " return new " + resType + "(from, to - from);\n" +
"}"); "}");
} }
else { else {
System.out.println("\npublic static " + resType + " rangeTo(" + t1 + " from, " + t2 + " to) {" + System.out.println("\npublic static " + resType + " rangeTo(" + t1 + " from, " + t2 + " to) {" +
"\n if(from > to) {\n" + "\n if (from > to) {\n" +
" return " + resType + ".EMPTY;\n" + " return " + resType + ".EMPTY;\n" +
" }\n" + " }\n" +
" else {\n" + " else {\n" +
" return new " + resType + "(from, to-from+1);\n" + " return new " + resType + "(from, to - from + 1);\n" +
" }\n" + " }\n" +
"}"); "}");
} }