You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ba...@apache.org on 2007/11/03 09:03:35 UTC
svn commit: r591559 -
/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ToStringStyle.java
Author: bayard
Date: Sat Nov 3 01:03:33 2007
New Revision: 591559
URL: http://svn.apache.org/viewvc?rev=591559&view=rev
Log:
Applying Scott Bassin's patch from LANG-371 - improving the documentation for ToStringStyle as per Paul's report
Modified:
commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ToStringStyle.java
Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ToStringStyle.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ToStringStyle.java?rev=591559&r1=591558&r2=591559&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ToStringStyle.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ToStringStyle.java Sat Nov 3 01:03:33 2007
@@ -71,28 +71,59 @@
public abstract class ToStringStyle implements Serializable {
/**
- * The default toString style.
+ * The default toString style. Using the Using the <code>Person</code>
+ * example from {@link ToStringBuilder}, the output would look like this:
+ *
+ * <pre>
+ * Person@182f0db[name=John Doe,age=33,smoker=false]
+ * </pre>
*/
public static final ToStringStyle DEFAULT_STYLE = new DefaultToStringStyle();
/**
- * The multi line toString style.
+ * The multi line toString style. Using the Using the <code>Person</code>
+ * example from {@link ToStringBuilder}, the output would look like this:
+ *
+ * <pre>
+ * Person@182f0db[
+ * name=John Doe
+ * age=33
+ * smoker=false
+ * ]
+ * </pre>
*/
public static final ToStringStyle MULTI_LINE_STYLE = new MultiLineToStringStyle();
/**
- * The no field names toString style.
+ * The no field names toString style. Using the Using the
+ * <code>Person</code> example from {@link ToStringBuilder}, the output
+ * would look like this:
+ *
+ * <pre>
+ * Person@182f0db[John Doe,33,false]
+ * </pre>
*/
public static final ToStringStyle NO_FIELD_NAMES_STYLE = new NoFieldNameToStringStyle();
/**
- * The short prefix toString style.
+ * The short prefix toString style. Using the <code>Person</code> example
+ * from {@link ToStringBuilder}, the output would look like this:
+ *
+ * <pre>
+ * Person[name=John Doe,age=33,smoker=false]
+ * </pre>
+ *
* @since 2.1
*/
public static final ToStringStyle SHORT_PREFIX_STYLE = new ShortPrefixToStringStyle();
/**
- * The simple toString style.
+ * The simple toString style. Using the Using the <code>Person</code>
+ * example from {@link ToStringBuilder}, the output would look like this:
+ *
+ * <pre>
+ * John Doe,33,false
+ * </pre>
*/
public static final ToStringStyle SIMPLE_STYLE = new SimpleToStringStyle();