make Section.toString() look alike other toString()s

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1145375 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-07-11 21:58:21 +00:00
parent 888489c310
commit 98c52813dd

View File

@ -59,18 +59,7 @@ public final class Section
@Override @Override
public String toString() public String toString()
{ {
return toString( true ); return "Section [" + getStartOffset() + "; " + getEndOffset() + ")";
}
public String toString( boolean withProperties )
{
return "Section ("
+ getStartOffset()
+ "--"
+ getEndOffset()
+ ")"
+ (withProperties ? "\n"
+ _props.toString().replaceAll( "\n", "\n\t" ) : "");
} }
} }