numberconverter.html

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

HTML
1,309
字号
<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#getAsObject(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.String)">getAsObject</A></B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A>&nbsp;context,            <A HREF="../../../javax/faces/component/UIComponent.html" title="class in javax.faces.component">UIComponent</A>&nbsp;component,            <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;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert the specified string value, which is associated with the specified <A HREF="../../../javax/faces/component/UIComponent.html" title="class in javax.faces.component"><CODE>UIComponent</CODE></A>, into a model data object that is appropriate for being stored during the <em>Apply Request Values</em> phase of the request processing lifecycle.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)">getAsString</A></B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A>&nbsp;context,            <A HREF="../../../javax/faces/component/UIComponent.html" title="class in javax.faces.component">UIComponent</A>&nbsp;component,            <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert the specified model object value, which is associated with the specified <A HREF="../../../javax/faces/component/UIComponent.html" title="class in javax.faces.component"><CODE>UIComponent</CODE></A>, into a String that is suitable for being included in the response generated during the <em>Render Response</em> phase of the request processing lifeycle.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#getCurrencyCode()">getCurrencyCode</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the ISO 4217 currency code used by <code>getAsString()</code> with a <code>type</code> of <code>currency</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#getCurrencySymbol()">getCurrencySymbol</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the currency symbol used by <code>getAsString()</code> with a <code>type</code> of <code>currency</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#getLocale()">getLocale</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the <code>Locale</code> to be used when parsing numbers.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#getMaxFractionDigits()">getMaxFractionDigits</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the maximum number of digits <code>getAsString()</code> should render in the fraction portion of the result.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#getMaxIntegerDigits()">getMaxIntegerDigits</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the maximum number of digits <code>getAsString()</code> should render in the integer portion of the result.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#getMinFractionDigits()">getMinFractionDigits</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the minimum number of digits <code>getAsString()</code> should render in the fraction portion of the result.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#getMinIntegerDigits()">getMinIntegerDigits</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the minimum number of digits <code>getAsString()</code> should render in the integer portion of the result.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#getPattern()">getPattern</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the format pattern to be used when formatting and parsing numbers.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#getType()">getType</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the number type to be used when formatting and parsing numbers.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#isGroupingUsed()">isGroupingUsed</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return <code>true</code> if <code>getAsString</code> should include grouping separators if necessary.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#isIntegerOnly()">isIntegerOnly</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return <code>true</code> if only the integer portion of the given value should be returned from <code>getAsObject()</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#isTransient()">isTransient</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If true, the Object implementing this interface must not participate in state saving or restoring.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#restoreState(javax.faces.context.FacesContext, java.lang.Object)">restoreState</A></B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A>&nbsp;context,             <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;state)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Perform any processing required to restore the state from the entries in the state Object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#saveState(javax.faces.context.FacesContext)">saveState</A></B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A>&nbsp;context)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gets the state of the instance as a <code>Serializable</code> Object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#setCurrencyCode(java.lang.String)">setCurrencyCode</A></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)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the ISO 4217 currency code used by <code>getAsString()</code> with a <code>type</code> of <code>currency</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#setCurrencySymbol(java.lang.String)">setCurrencySymbol</A></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)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the currency symbol used by <code>getAsString()</code> with a <code>type</code> of <code>currency</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#setGroupingUsed(boolean)">setGroupingUsed</A></B>(boolean&nbsp;groupingUsed)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the flag indicating whether <code>getAsString()</code> should include grouping separators if necessary.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#setIntegerOnly(boolean)">setIntegerOnly</A></B>(boolean&nbsp;integerOnly)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set to <code>true</code> if only the integer portion of the given value should be returned from <code>getAsObject()</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#setLocale(java.util.Locale)">setLocale</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A>&nbsp;locale)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the <code>Locale</code> to be used when parsing numbers.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#setMaxFractionDigits(int)">setMaxFractionDigits</A></B>(int&nbsp;maxFractionDigits)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the maximum number of digits <code>getAsString()</code> should render in the fraction portion of the result.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#setMaxIntegerDigits(int)">setMaxIntegerDigits</A></B>(int&nbsp;maxIntegerDigits)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the maximum number of digits <code>getAsString()</code> should render in the integer portion of the result.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#setMinFractionDigits(int)">setMinFractionDigits</A></B>(int&nbsp;minFractionDigits)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the minimum number of digits <code>getAsString()</code> should render in the fraction portion of the result.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#setMinIntegerDigits(int)">setMinIntegerDigits</A></B>(int&nbsp;minIntegerDigits)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the minimum number of digits <code>getAsString()</code> should render in the integer portion of the result.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#setPattern(java.lang.String)">setPattern</A></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;pattern)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the format pattern to be used when formatting and parsing numbers.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#setTransient(boolean)">setTransient</A></B>(boolean&nbsp;transientFlag)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/convert/NumberConverter.html#setType(java.lang.String)">setType</A></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;type)</CODE>

⌨️ 快捷键说明

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