- private boolean empty() {
- for(T t : this) return false;
- return true;
- }
-
- private static final int MAXDEPTH=3;
- public int depth() {
- int depth = headToString()==null ? 0 : 1;
- int ret = depth;
- for(T t : this) ret = Math.max(ret, depth+t.depth());
- return ret;
- }
- public String toString(int indent0, int cur, int limit) {
- int indent = indent0;
- String s = toString();
- if (depth()<MAXDEPTH && s.length() < limit-cur) return s;
- StringBuffer ret = new StringBuffer();