poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1143011 - /poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Section.java
Date Tue, 05 Jul 2011 11:58:24 GMT
Author: sergey
Date: Tue Jul  5 11:58:24 2011
New Revision: 1143011

URL: http://svn.apache.org/viewvc?rev=1143011&view=rev
Log:
add Section.toString() for debug purposes

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Section.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Section.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Section.java?rev=1143011&r1=1143010&r2=1143011&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Section.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Section.java Tue Jul  5 11:58:24
2011
@@ -49,5 +49,21 @@ public final class Section
      return s;
    }
 
+    @Override
+    public String toString()
+    {
+        return toString( true );
+    }
+
+    public String toString( boolean withProperties )
+    {
+        return "Section ("
+                + getStartOffset()
+                + "--"
+                + getEndOffset()
+                + ")"
+                + (withProperties ? "\n"
+                        + _props.toString().replaceAll( "\n", "\n\t" ) : "");
+    }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message