@Test public void testReset() throws Exception { String filterString = "a1c25s10d2016-01-03o4"; Node root = new FilterParser().parse(filterString); ToStringTreeVisitor visitor = new ToStringTreeVisitor(); new TreeTraverser().traverse(root, visitor); assertEquals("_1_ >= 2016-01-03", visitor.toString()); visitor.reset(); assertEquals("", visitor.toString()); }
public void reset() { sb.setLength(0); }
ToStringTreeVisitor implements TreeVisitor { public void reset() { sb.setLength(0); } }
ToStringTreeVisitor implements TreeVisitor { public void reset() { sb.setLength(0); }  }
ToStringTreeVisitor implements TreeVisitor { public void reset() { sb.setLength(0); }  @Override Node before(Node node, final int level); @Override Node visit(Node node, final int level); @Override Node after(Node node, final int level); @Override String toString(); void reset(); }
ToStringTreeVisitor implements TreeVisitor { public void reset() { sb.setLength(0); }  @Override Node before(Node node, final int level); @Override Node visit(Node node, final int level); @Override Node after(Node node, final int level); @Override String toString(); void reset();  }