⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bigdecimal.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<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="../../java/math/BigDecimal.html#compareTo(java.math.BigDecimal)">compareTo</A></B>(<A HREF="../../java/math/BigDecimal.html">BigDecimal</A>&nbsp;val)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares this BigDecimal with the specified BigDecimal.</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="../../java/math/BigDecimal.html#compareTo(java.lang.Object)">compareTo</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;o)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares this BigDecimal with the specified Object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#divide(java.math.BigDecimal, int)">divide</A></B>(<A HREF="../../java/math/BigDecimal.html">BigDecimal</A>&nbsp;val,       int&nbsp;roundingMode)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a BigDecimal whose value is <tt>(this / val)</tt>, and whose scale is <tt>this.scale()</tt>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#divide(java.math.BigDecimal, int, int)">divide</A></B>(<A HREF="../../java/math/BigDecimal.html">BigDecimal</A>&nbsp;val,       int&nbsp;scale,       int&nbsp;roundingMode)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a BigDecimal whose value is <tt>(this / val)</tt>, and whose scale is as specified.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#doubleValue()">doubleValue</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts this BigDecimal to a double.</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="../../java/math/BigDecimal.html#equals(java.lang.Object)">equals</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares this BigDecimal with the specified Object for equality.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;float</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#floatValue()">floatValue</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts this BigDecimal to a float.</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="../../java/math/BigDecimal.html#hashCode()">hashCode</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the hash code for this BigDecimal.</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="../../java/math/BigDecimal.html#intValue()">intValue</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts this BigDecimal to an int.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#longValue()">longValue</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts this BigDecimal to a long.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#max(java.math.BigDecimal)">max</A></B>(<A HREF="../../java/math/BigDecimal.html">BigDecimal</A>&nbsp;val)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the maximum of this BigDecimal and <tt>val</tt>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#min(java.math.BigDecimal)">min</A></B>(<A HREF="../../java/math/BigDecimal.html">BigDecimal</A>&nbsp;val)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the minimum of this BigDecimal and <tt>val</tt>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#movePointLeft(int)">movePointLeft</A></B>(int&nbsp;n)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a BigDecimal which is equivalent to this one with the decimal point moved n places to the left.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#movePointRight(int)">movePointRight</A></B>(int&nbsp;n)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the decimal point the specified number of places to the right.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#multiply(java.math.BigDecimal)">multiply</A></B>(<A HREF="../../java/math/BigDecimal.html">BigDecimal</A>&nbsp;val)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a BigDecimal whose value is <tt>(this * val)</tt>, and whose scale is <tt>(this.scale() + val.scale())</tt>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#negate()">negate</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a BigDecimal whose value is <tt>(-this)</tt>, and whose scale is this.scale().</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="../../java/math/BigDecimal.html#scale()">scale</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <i>scale</i> of this BigDecimal.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#setScale(int)">setScale</A></B>(int&nbsp;scale)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to this BigDecimal's.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#setScale(int, int)">setScale</A></B>(int&nbsp;scale,         int&nbsp;roundingMode)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a BigDecimal whose scale is the specified value, and whose unscaled value is determined by multiplying or dividing this BigDecimal's unscaled value by the appropriate power of ten to maintain its overall value.</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="../../java/math/BigDecimal.html#signum()">signum</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the signum function of this BigDecimal.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#subtract(java.math.BigDecimal)">subtract</A></B>(<A HREF="../../java/math/BigDecimal.html">BigDecimal</A>&nbsp;val)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a BigDecimal whose value is <tt>(this - val)</tt>, and whose scale is <tt>max(this.scale(), val.scale())</tt>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/math/BigInteger.html">BigInteger</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#toBigInteger()">toBigInteger</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts this BigDecimal to a BigInteger.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the string representation of this BigDecimal.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/math/BigInteger.html">BigInteger</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#unscaledValue()">unscaledValue</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a BigInteger whose value is the <i>unscaled value</i> of this BigDecimal.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#valueOf(long)">valueOf</A></B>(long&nbsp;val)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Translates a long value into a BigDecimal with a scale of zero.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/math/BigDecimal.html#valueOf(long, int)">valueOf</A></B>(long&nbsp;unscaledVal,        int&nbsp;scale)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Translates a long unscaled value and an int scale into a BigDecimal.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Number"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Number.html">Number</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Number.html#byteValue()">byteValue</A>, <A HREF="../../java/lang/Number.html#shortValue()">shortValue</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="ROUND_UP"><!-- --></A><H3>ROUND_UP</H3><PRE>public static final int <B>ROUND_UP</B></PRE><DL><DD>Rounding mode to round away from zero.  Always increments the digit prior to a non-zero discarded fraction.  Note that this rounding mode never decreases the magnitude of the calculated value.</DL><HR>

⌨️ 快捷键说明

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