diff options
| author | Tom Tromey <tromey@redhat.com> | 2005-09-21 17:00:30 +0000 |
|---|---|---|
| committer | Tom Tromey <tromey@redhat.com> | 2005-09-21 17:00:30 +0000 |
| commit | 925cc2854b4b301a37f4e034f80da8cc7281c77f (patch) | |
| tree | a6d39ba4a1d40f9d606d0be40bb7fec98bf094bb /java/math/BigDecimal.java | |
| parent | d72cadfe11c557bfb27a9a3ac3549304e77816b4 (diff) | |
| download | classpath-925cc2854b4b301a37f4e034f80da8cc7281c77f.tar.gz | |
* java/math/BigDecimal.java (ZERO, ONE): Now public. Updated
javadoc.
(TEN): New constant.
* java/math/BigInteger.java (ZERO): Updated javadoc.
(ONE): Likewise.
(TEN): New constant.
Diffstat (limited to 'java/math/BigDecimal.java')
| -rw-r--r-- | java/math/BigDecimal.java | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/java/math/BigDecimal.java b/java/math/BigDecimal.java index d99be0f56..693c39987 100644 --- a/java/math/BigDecimal.java +++ b/java/math/BigDecimal.java @@ -43,12 +43,27 @@ public class BigDecimal extends Number implements Comparable private int scale; private static final long serialVersionUID = 6108874887143696463L; - private static final BigDecimal ZERO = + /** + * The constant zero as a BigDecimal with scale zero. + * @since 1.5 + */ + public static final BigDecimal ZERO = new BigDecimal (BigInteger.valueOf (0), 0); - private static final BigDecimal ONE = + /** + * The constant one as a BigDecimal with scale zero. + * @since 1.5 + */ + public static final BigDecimal ONE = new BigDecimal (BigInteger.valueOf (1), 0); + /** + * The constant ten as a BigDecimal with scale zero. + * @since 1.5 + */ + public static final BigDecimal TEN = + new BigDecimal (BigInteger.valueOf (10), 0); + public static final int ROUND_UP = 0; public static final int ROUND_DOWN = 1; public static final int ROUND_CEILING = 2; |
