57 |
* @date December 20, 1999. |
* @date December 20, 1999. |
58 |
* @status believed complete and correct. |
* @status believed complete and correct. |
59 |
*/ |
*/ |
60 |
public class BigInteger extends Number implements Comparable |
public class BigInteger extends Number implements Comparable<BigInteger> |
61 |
{ |
{ |
62 |
/** All integers are stored in 2's-complement form. |
/** All integers are stored in 2's-complement form. |
63 |
* If words == null, the ival is the value of this BigInteger. |
* If words == null, the ival is the value of this BigInteger. |
368 |
return MPN.cmp(x.words, y.words, x_len); |
return MPN.cmp(x.words, y.words, x_len); |
369 |
} |
} |
370 |
|
|
371 |
// JDK1.2 |
/** @since 1.2 */ |
|
public int compareTo(Object obj) |
|
|
{ |
|
|
if (obj instanceof BigInteger) |
|
|
return compareTo(this, (BigInteger) obj); |
|
|
throw new ClassCastException(); |
|
|
} |
|
|
|
|
372 |
public int compareTo(BigInteger val) |
public int compareTo(BigInteger val) |
373 |
{ |
{ |
374 |
return compareTo(this, val); |
return compareTo(this, val); |