/** {@inheritDoc} */ @Override public String toString() { final StringBuilder buf = new StringBuilder("{"); for (int i = 0, end = _pos - 1; i < end; i++) { buf.append(_data.get(i)); buf.append(", "); } if (size() > 0) { buf.append(_data.get(_pos - 1)); } buf.append("}"); return buf.toString(); }
/** {@inheritDoc} */ @Override public String toString() { final StringBuilder buf = new StringBuilder("{"); forEachEntry( new TCharCharProcedure() { private boolean first = true; @Override public boolean execute(char key, char value) { if (first) first = false; else buf.append(", "); buf.append(key); buf.append("="); buf.append(value); return true; } }); buf.append("}"); return buf.toString(); }