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

📄 biginteger.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a BigInteger whose value is equal to that of the specified long.</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/BigInteger.html#xor(java.math.BigInteger)">xor</A></B>(<A HREF="../../java/math/BigInteger.html">BigInteger</A>&nbsp;val)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a BigInteger whose value is <tt>(this ^ val)</tt>.</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="ZERO"><!-- --></A><H3>ZERO</H3><PRE>public static final <A HREF="../../java/math/BigInteger.html">BigInteger</A> <B>ZERO</B></PRE><DL><DD>The BigInteger constant zero.<DD><DL><DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="ONE"><!-- --></A><H3>ONE</H3><PRE>public static final <A HREF="../../java/math/BigInteger.html">BigInteger</A> <B>ONE</B></PRE><DL><DD>The BigInteger constant one.<DD><DL><DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="BigInteger(byte[])"><!-- --></A><H3>BigInteger</H3><PRE>public <B>BigInteger</B>(byte[]&nbsp;val)</PRE><DL><DD>Translates a byte array containing the two's-complement binary representation of a BigInteger into a BigInteger.  The input array is assumed to be in <i>big-endian</i> byte-order: the most significant byte is in the zeroth element.<DD><DL><DT><B>Parameters:</B><DD><CODE>val</CODE> - big-endian two's-complement binary representation of	       BigInteger.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/NumberFormatException.html">NumberFormatException</A></CODE> - <tt>val</tt> is zero bytes long.</DL></DD></DL><HR><A NAME="BigInteger(int, byte[])"><!-- --></A><H3>BigInteger</H3><PRE>public <B>BigInteger</B>(int&nbsp;signum,                  byte[]&nbsp;magnitude)</PRE><DL><DD>Translates the sign-magnitude representation of a BigInteger into a BigInteger.  The sign is represented as an integer signum value: -1 for negative, 0 for zero, or 1 for positive.  The magnitude is a byte array in <i>big-endian</i> byte-order: the most significant byte is in the zeroth element.  A zero-length magnitude array is permissible, and will result in in a BigInteger value of 0, whether signum is -1, 0 or 1.<DD><DL><DT><B>Parameters:</B><DD><CODE>signum</CODE> - signum of the number (-1 for negative, 0 for zero, 1 	       for positive).<DD><CODE>magnitude</CODE> - big-endian binary representation of the magnitude of 	       the number.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/NumberFormatException.html">NumberFormatException</A></CODE> - <tt>signum</tt> is not one of the three	       legal values (-1, 0, and 1), or <tt>signum</tt> is 0 and	       <tt>magnitude</tt> contains one or more non-zero bytes.</DL></DD></DL><HR><A NAME="BigInteger(java.lang.String, int)"><!-- --></A><H3>BigInteger</H3><PRE>public <B>BigInteger</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;val,                  int&nbsp;radix)</PRE><DL><DD>Translates the String representation of a BigInteger in the specified radix into a BigInteger.  The String representation consists of an optional minus sign followed by a sequence of one or more digits in the specified radix.  The character-to-digit mapping is provided by <tt>Character.digit</tt>.  The String may not contain any extraneous characters (whitespace, for example).<DD><DL><DT><B>Parameters:</B><DD><CODE>val</CODE> - String representation of BigInteger.<DD><CODE>radix</CODE> - radix to be used in interpreting <tt>val</tt>.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/NumberFormatException.html">NumberFormatException</A></CODE> - <tt>val</tt> is not a valid representation	       of a BigInteger in the specified radix, or <tt>radix</tt> is	       outside the range from <tt>Character.MIN_RADIX</tt> (2) to	       <tt>Character.MAX_RADIX</tt> (36), inclusive.<DT><B>See Also: </B><DD><A HREF="../../java/lang/Character.html#digit(char, int)"><CODE>Character.digit(char, int)</CODE></A></DL></DD></DL><HR><A NAME="BigInteger(java.lang.String)"><!-- --></A><H3>BigInteger</H3><PRE>public <B>BigInteger</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;val)</PRE><DL><DD>Translates the decimal String representation of a BigInteger into a BigInteger.  The String representation consists of an optional minus sign followed by a sequence of one or more decimal digits.  The character-to-digit mapping is provided by <tt>Character.digit</tt>. The String may not contain any extraneous characters (whitespace, for example).<DD><DL><DT><B>Parameters:</B><DD><CODE>val</CODE> - decimal String representation of BigInteger.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/NumberFormatException.html">NumberFormatException</A></CODE> - <tt>val</tt> is not a valid representation	       of a BigInteger.<DT><B>See Also: </B><DD><A HREF="../../java/lang/Character.html#digit(char, int)"><CODE>Character.digit(char, int)</CODE></A></DL></DD></DL><HR><A NAME="BigInteger(int, java.util.Random)"><!-- --></A><H3>BigInteger</H3><PRE>public <B>BigInteger</B>(int&nbsp;numBits,                  <A HREF="../../java/util/Random.html">Random</A>&nbsp;rnd)</PRE><DL><DD>Constructs a randomly generated BigInteger, uniformly distributed over the range <tt>0</tt> to <tt>(2<sup>numBits</sup> - 1)</tt>, inclusive. The uniformity of the distribution assumes that a fair source of random bits is provided in <tt>rnd</tt>.  Note that this constructor always constructs a non-negative BigInteger.<DD><DL><DT><B>Parameters:</B><DD><CODE>numBits</CODE> - maximum bitLength of the new BigInteger.<DD><CODE>rnd</CODE> - source of randomness to be used in computing the new	       BigInteger.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - <tt>numBits</tt> is negative.<DT><B>See Also: </B><DD><A HREF="../../java/math/BigInteger.html#bitLength()"><CODE>bitLength()</CODE></A></DL></DD></DL><HR><A NAME="BigInteger(int, int, java.util.Random)"><!-- --></A><H3>BigInteger</H3><PRE>public <B>BigInteger</B>(int&nbsp;bitLength,                  int&nbsp;certainty,                  <A HREF="../../java/util/Random.html">Random</A>&nbsp;rnd)</PRE><DL><DD>Constructs a randomly generated positive BigInteger that is probably prime, with the specified bitLength.<DD><DL><DT><B>Parameters:</B><DD><CODE>bitLength</CODE> - bitLength of the returned BigInteger.<DD><CODE>certainty</CODE> - a measure of the uncertainty that the caller is         willing to tolerate.  The probability that the new BigInteger	       represents a prime number will exceed	       <tt>(1 - 1/2<sup>certainty</sup></tt>).  The execution time of	       this constructor is proportional to the value of this parameter.<DD><CODE>rnd</CODE> - source of random bits used to select candidates to be	       tested for primality.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/ArithmeticException.html">ArithmeticException</A></CODE> - <tt>bitLength &lt; 2</tt>.<DT><B>See Also: </B><DD><A HREF="../../java/math/BigInteger.html#bitLength()"><CODE>bitLength()</CODE></A></DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="valueOf(long)"><!-- --></A><H3>valueOf</H3><PRE>public static <A HREF="../../java/math/BigInteger.html">BigInteger</A> <B>valueOf</B>(long&nbsp;val)</PRE><DL><DD>Returns a BigInteger whose value is equal to that of the specified long.  This "static factory method" is provided in preference to a (long) constructor because it allows for reuse of frequently used BigIntegers.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>val</CODE> - value of the BigInteger to return.<DT><B>Returns:</B><DD>a BigInteger with the specified value.</DL></DD></DL><HR><A NAME="add(java.math.BigInteger)"><!-- --></A><H3>add</H3><PRE>public <A HREF="../../java/math/BigInteger.html">BigInteger</A> <B>add</B>(<A HREF="../../java/math/BigInteger.html">BigInteger</A>&nbsp;val)</PRE><DL><DD>Returns a BigInteger whose value is <tt>(this + val)</tt>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>val</CODE> - value to be added to this BigInteger.<DT><B>Returns:</B><DD><tt>this + val</tt></DL></DD></DL><HR><A NAME="subtract(java.math.BigInteger)"><!-- --></A><H3>subtract</H3><PRE>public <A HREF="../../java/math/BigInteger.html">BigInteger</A> <B>subtract</B>(<A HREF="../../java/math/BigInteger.html">BigInteger</A>&nbsp;val)</PRE><DL><DD>Returns a BigInteger whose value is <tt>(this - val)</tt>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>val</CODE> - value to be subtracted from this BigInteger.<DT><B>Returns:</B><DD><tt>this - val</tt></DL></DD></DL><HR><A NAME="multiply(java.math.BigInteger)"><!-- --></A><H3>multiply</H3><PRE>public <A HREF="../../java/math/BigInteger.html">BigInteger</A> <B>multiply</B>(<A HREF="../../java/math/BigInteger.html">BigInteger</A>&nbsp;val)</PRE><DL><DD>Returns a BigInteger whose value is <tt>(this * val)</tt>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>val</CODE> - value to be multiplied by this BigInteger.<DT><B>Returns:</B><DD><tt>this * val</tt></DL></DD></DL><HR><A NAME="divide(java.math.BigInteger)"><!-- --></A><H3>divide</H3><PRE>public <A HREF="../../java/math/BigInteger.html">BigInteger</A> <B>divide</B>(<A HREF="../../java/math/BigInteger.html">BigInteger</A>&nbsp;val)</PRE><DL><DD>Returns a BigInteger whose value is <tt>(this / val)</tt>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>val</CODE> - value by which this BigInteger is to be divided.<DT><B>Returns:</B><DD><tt>this / val</tt><DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/ArithmeticException.html">ArithmeticException</A></CODE> - <tt>val==0</tt></DL></DD></DL><HR><A NAME="divideAndRemainder(java.math.BigInteger)"><!-- --></A><H3>divideAndRemainder</H3><PRE>public <A HREF="../../java/math/BigInteger.html">BigInteger</A>[] <B>divideAndRemainder</B>(<A HREF="../../java/math/BigInteger.html">BigInteger</A>&nbsp;val)</PRE><DL><DD>Returns an array of two BigIntegers containing <tt>(this / val)</tt> followed by <tt>(this % val)</tt>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>val</CODE> - value by which this BigInteger is to be divided, and the	       remainder computed.<DT><B>Returns:</B><DD>an array of two BigIntegers: the quotient <tt>(this / val)</tt>	       is the initial element, and the remainder <tt>(this % val)</tt>	       is the final element.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/ArithmeticException.html">ArithmeticException</A></CODE> - <tt>val==0</tt></DL></DD></DL><HR><A NAME="remainder(java.math.BigInteger)"><!-- --></A><H3>remainder</H3><PRE>

⌨️ 快捷键说明

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