Beispiel #1
0
 @Override
 public String toString() {
   final StringBuilder sb = new StringBuilder();
   final int pl = post.length;
   for (int p = 0; p < pl; p++) {
     sb.append(LET).append(" (: post-group :) ").append(post[p]);
     sb.append(' ').append(ASSIGN).append(' ').append(preExpr[p]).append(' ');
   }
   sb.append(GROUP).append(' ').append(BY);
   final int sl = specs.length;
   for (int s = 0; s < sl; s++) sb.append(s == 0 ? " " : SEP).append(specs[s]);
   return sb.toString();
 }
Beispiel #2
0
 @Override
 StringBuilder toString(final StringBuilder sb, final String ind) {
   final int s = Integer.bitCount(used);
   for (int i = 0, j = 0; i < s; i++, j++) {
     while ((used & 1 << j) == 0) j++;
     final int e = i == s - 1 ? 2 : 0;
     sb.append(ind).append(ENDS[e]).append(String.format("%x", j)).append('\n');
     kids[j].toString(sb, ind + ENDS[e + 1]);
   }
   return sb;
 }