You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mb...@apache.org on 2008/03/21 23:18:36 UTC
svn commit: r639889 - /commons/proper/lang/trunk/xdocs/article2_4.xml
Author: mbenson
Date: Fri Mar 21 15:18:33 2008
New Revision: 639889
URL: http://svn.apache.org/viewvc?rev=639889&view=rev
Log:
fmting
Modified:
commons/proper/lang/trunk/xdocs/article2_4.xml
Modified: commons/proper/lang/trunk/xdocs/article2_4.xml
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/xdocs/article2_4.xml?rev=639889&r1=639888&r2=639889&view=diff
==============================================================================
--- commons/proper/lang/trunk/xdocs/article2_4.xml (original)
+++ commons/proper/lang/trunk/xdocs/article2_4.xml Fri Mar 21 15:18:33 2008
@@ -116,14 +116,13 @@
new ExtendedMessageFormat("EIN: {0,ein}", Collections.singletonMap(EINFormatFactory.EIN_FORMAT, new EINFormatFactory()));
</code></pre>
As expected, this will render a String EIN "AA-9999" as: <code>"EIN: AA-9999"</code>.
-<br />
+<br /> <br />
If we wanted to trigger the EIN masking code, we could trigger that in the format pattern:
<pre><code>
new ExtendedMessageFormat("EIN: {0,ein,#}", Collections.singletonMap(EINFormatFactory.EIN_FORMAT, new EINFormatFactory()));
</code></pre>
This should render "AA-9999" as: <code>"EIN: AA-####"</code>.
-</p>
-<p>
+<br /> <br />
You can also use <code>ExtendedMessageFormat</code> to override any or all of the built-in
formats supported by <code>java.text.MessageFormat</code>. Finally, note that because
<code>ExtendedMessageFormat</code> extends <code>MessageFormat</code> it should work in most