+ }
+
+ protected void println(StringBuilder sb, int indent, Object ... objs) {
+ for(int i=0;i<indent;++i) {
+ sb.append(' ');
+ }
+ for(Object o : objs) {
+ sb.append(o.toString());
+ }
+ sb.append('\n');
+ }
+
+ protected String printCell(StringBuilder sb, int indent, String current, String prev) {
+ if(current.equals(prev)) {
+ println(sb,indent,DUPL);
+ } else {
+ printCell(sb,indent,current);
+ }
+ return current; // use to set prev...
+ }
+
+ protected void printCell(StringBuilder sb, int indent, String current) {
+ println(sb,indent,"<td>",current,"</td>");
+ }
+
+ public synchronized void inc() {
+ ++count;
+ }
+
+ public int count() {
+ return count;