numberconverter.html

来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 1,309 行 · 第 1/5 页

HTML
1,309
字号
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the number type to be used when formatting and parsing numbers.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="CONVERTER_ID"><!-- --></A><H3>CONVERTER_ID</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>CONVERTER_ID</B></PRE><DL><DD><p>The standard converter id for this converter.</p><P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.faces.convert.NumberConverter.CONVERTER_ID">Constant Field Values</A></DL></DL><HR><A NAME="CURRENCY_ID"><!-- --></A><H3>CURRENCY_ID</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>CURRENCY_ID</B></PRE><DL><DD><p>The message identifier of the <A HREF="../../../javax/faces/application/FacesMessage.html" title="class in javax.faces.application"><CODE>FacesMessage</CODE></A> to be created if the conversion to <code>Number</code> fails.  The message format string for this message may optionally include the following placeholders: <ul> <li><code>{0}</code> replaced by the unconverted value.</li> <li><code>{1}</code> replaced by an example value.</li> <li><code>{2}</code> replaced by a <code>String</code> whose value   is the label of the input component that produced this message.</li> </ul></p><P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.faces.convert.NumberConverter.CURRENCY_ID">Constant Field Values</A></DL></DL><HR><A NAME="NUMBER_ID"><!-- --></A><H3>NUMBER_ID</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>NUMBER_ID</B></PRE><DL><DD><p>The message identifier of the <A HREF="../../../javax/faces/application/FacesMessage.html" title="class in javax.faces.application"><CODE>FacesMessage</CODE></A> to be created if the conversion to <code>Number</code> fails.  The message format string for this message may optionally include the following placeholders: <ul> <li><code>{0}</code> replaced by the unconverted value.</li> <li><code>{1}</code> replaced by an example value.</li> <li><code>{2}</code> replaced by a <code>String</code> whose value   is the label of the input component that produced this message.</li> </ul></p><P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.faces.convert.NumberConverter.NUMBER_ID">Constant Field Values</A></DL></DL><HR><A NAME="PATTERN_ID"><!-- --></A><H3>PATTERN_ID</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>PATTERN_ID</B></PRE><DL><DD><p>The message identifier of the <A HREF="../../../javax/faces/application/FacesMessage.html" title="class in javax.faces.application"><CODE>FacesMessage</CODE></A> to be created if the conversion to <code>Number</code> fails.  The message format string for this message may optionally include the following placeholders: <ul> <li><code>{0}</code> replaced by the unconverted value.</li> <li><code>{1}</code> replaced by an example value.</li> <li><code>{2}</code> replaced by a <code>String</code> whose value   is the label of the input component that produced this message.</li> </ul></p><P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.faces.convert.NumberConverter.PATTERN_ID">Constant Field Values</A></DL></DL><HR><A NAME="PERCENT_ID"><!-- --></A><H3>PERCENT_ID</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>PERCENT_ID</B></PRE><DL><DD><p>The message identifier of the <A HREF="../../../javax/faces/application/FacesMessage.html" title="class in javax.faces.application"><CODE>FacesMessage</CODE></A> to be created if the conversion to <code>Number</code> fails.  The message format string for this message may optionally include the following placeholders: <ul> <li><code>{0}</code> replaced by the unconverted value.</li> <li><code>{1}</code> replaced by an example value.</li> <li><code>{2}</code> replaced by a <code>String</code> whose value   is the label of the input component that produced this message.</li> </ul></p><P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.faces.convert.NumberConverter.PERCENT_ID">Constant Field Values</A></DL></DL><HR><A NAME="STRING_ID"><!-- --></A><H3>STRING_ID</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>STRING_ID</B></PRE><DL><DD><p>The message identifier of the <A HREF="../../../javax/faces/application/FacesMessage.html" title="class in javax.faces.application"><CODE>FacesMessage</CODE></A> to be created if  the conversion of the <code>Number</code> value to  <code>String</code> fails.   The message format string for this message  may optionally include the following placeholders: <ul> <li><code>{0}</code> relaced by the unconverted value.</li> <li><code>{1}</code> replaced by a <code>String</code> whose value   is the label of the input component that produced this message.</li> </ul></p><P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.faces.convert.NumberConverter.STRING_ID">Constant Field Values</A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="NumberConverter()"><!-- --></A><H3>NumberConverter</H3><PRE>public <B>NumberConverter</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getCurrencyCode()"><!-- --></A><H3>getCurrencyCode</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getCurrencyCode</B>()</PRE><DL><DD><p>Return the ISO 4217 currency code used by <code>getAsString()</code> with a <code>type</code> of <code>currency</code>.  If not set, the value used will be based on the formatting <code>Locale</code>.</p><P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setCurrencyCode(java.lang.String)"><!-- --></A><H3>setCurrencyCode</H3><PRE>public void <B>setCurrencyCode</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;currencyCode)</PRE><DL><DD><p>Set the ISO 4217 currency code used by <code>getAsString()</code> with a <code>type</code> of <code>currency</code>.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>currencyCode</CODE> - The new currency code</DL></DD></DL><HR><A NAME="getCurrencySymbol()"><!-- --></A><H3>getCurrencySymbol</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getCurrencySymbol</B>()</PRE><DL><DD><p>Return the currency symbol used by <code>getAsString()</code> with a <code>type</code> of <code>currency</code>.  If not set, the value used will be based on the formatting <code>Locale</code>.</p><P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setCurrencySymbol(java.lang.String)"><!-- --></A><H3>setCurrencySymbol</H3><PRE>public void <B>setCurrencySymbol</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;currencySymbol)</PRE><DL><DD><p>Set the currency symbol used by <code>getAsString()</code> with a <code>type</code> of <code>currency</code>.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>currencySymbol</CODE> - The new currency symbol</DL></DD></DL><HR><A NAME="isGroupingUsed()"><!-- --></A><H3>isGroupingUsed</H3><PRE>public boolean <B>isGroupingUsed</B>()</PRE><DL><DD><p>Return <code>true</code> if <code>getAsString</code> should include grouping separators if necessary.  If not modified, the default value is <code>true</code>.</p><P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setGroupingUsed(boolean)"><!-- --></A><H3>setGroupingUsed</H3><PRE>public void <B>setGroupingUsed</B>(boolean&nbsp;groupingUsed)</PRE><DL>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?