diff options
author | Wolfgang Baer <WBaer@gmx.de> | 2005-11-19 15:56:49 +0000 |
---|---|---|
committer | Wolfgang Baer <WBaer@gmx.de> | 2005-11-19 15:56:49 +0000 |
commit | 7100c87a10e4eff07fd7e429bcd9df8d44c2ea0c (patch) | |
tree | 445bc8a769cd2d9d8dd593b18b4093b3b1a72b99 /javax | |
parent | 6171f93c82b868b420176746d7f31f21c8db0201 (diff) | |
download | classpath-7100c87a10e4eff07fd7e429bcd9df8d44c2ea0c.tar.gz |
2005-11-19 Wolfgang Baer <WBaer@gmx.de>
* javax/print/attribute/ResolutionSyntax.java (toString):
Changed to not append the unitsName if null. Clarified api docs.
Diffstat (limited to 'javax')
-rw-r--r-- | javax/print/attribute/ResolutionSyntax.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/javax/print/attribute/ResolutionSyntax.java b/javax/print/attribute/ResolutionSyntax.java index be8c94d56..aca4c0188 100644 --- a/javax/print/attribute/ResolutionSyntax.java +++ b/javax/print/attribute/ResolutionSyntax.java @@ -254,12 +254,16 @@ public abstract class ResolutionSyntax * </p> * * @param units the units to use - * @param unitsName the name of the units + * @param unitsName the name of the units. If <code>null</code> + * it is ommitted from the string representation. * * @return The string representation. */ public String toString(int units, String unitsName) { + if (unitsName == null) + return getCrossFeedResolution(units) + "x" + getFeedResolution(units); + return ("" + getCrossFeedResolution(units) + "x" + getFeedResolution(units) + " " + unitsName); |