Contents |
Eclipse Detail Formatters for Java 1.4 or earlier
java.util.Collection
StringBuffer builder = new StringBuffer(); builder.append("[\r\n"); for (final Iterator it = this.iterator(); it.hasNext();) { Object val = it.next(); builder.append("\t").append(val.toString()).append(",\r\n"); } builder.append("]"); return builder.toString();
java.util.Map
StringBufferbuilder = new StringBuffer(); builder.append("{ \r\n"); for (final Iterator it = this.keySet().iterator(); it.hasNext();) { Object key = it.next(); builder.append("\t").append(key.toString()).append(" => "); builder.append(this.get(key).toString()).append("\r\n"); } builder.append("}"); return builder.toString();
org.jdom.Document / org.jdom.Element
org.jdom.output.XMLOutputter outputter = new org.jdom.output.XMLOutputter(org.jdom.output.Format.getPrettyFormat()); return outputter.outputString(this);
- Views -
Page -
Discussion -
View source -
History -
- Personal tools - Log in -
- Special - Special pages -
- Personal tools - Log in -
- Special - Special pages -