diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-09-23 08:00:53 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-09-23 08:00:53 +0000 |
commit | 0af742ffbc9e8c5d9dc67c24f1a196f49f3f8063 (patch) | |
tree | a93b6d17c10dabb0d0757030182e70a50827def7 /src/java | |
parent | 49cc7b8b39cfa8b75133f32868c03c5e3ab63bfa (diff) | |
download | xmlgraphics-fop-0af742ffbc9e8c5d9dc67c24f1a196f49f3f8063.tar.gz xmlgraphics-fop-0af742ffbc9e8c5d9dc67c24f1a196f49f3f8063.zip |
Compressing toString() output when min==opt==max makes it more readable.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@291092 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/fop/traits/MinOptMax.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/traits/MinOptMax.java b/src/java/org/apache/fop/traits/MinOptMax.java index ad3259ea7..47469d161 100644 --- a/src/java/org/apache/fop/traits/MinOptMax.java +++ b/src/java/org/apache/fop/traits/MinOptMax.java @@ -163,8 +163,20 @@ public class MinOptMax implements java.io.Serializable, Cloneable { max -= op.min; } + /** @see java.lang.Object#toString() */ public String toString() { - return "MinOptMax: min=" + min + "; opt=" + opt + "; max=" + max; + StringBuffer sb = new StringBuffer(); + sb.append("MinOptMax[min="); + if (min != opt) { + sb.append(min).append("; "); + } + sb.append("opt="); + if (opt != max) { + sb.append(opt).append("; "); + } + sb.append("max=").append(max); + sb.append("]"); + return sb.toString(); } } |