Skip to content

Commit 159c983

Browse files
committed
Add missing javadoc
1 parent 40efb0b commit 159c983

10 files changed

Lines changed: 4076 additions & 40 deletions

src/main/java/org/codehaus/groovy/runtime/typehandling/BigDecimalMath.java

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,31 @@
2525
import java.math.RoundingMode;
2626

2727
/**
28-
* BigDecimal NumberMath operations
28+
* Arbitrary-precision decimal arithmetic operations.
29+
* <p>
30+
* Singleton instance providing NumberMath implementations for BigDecimal-based operations.
31+
* Supports exact decimal arithmetic with configurable precision and rounding.
32+
* This is the default math provider for non-floating-point division operations.
2933
*/
3034
public final class BigDecimalMath extends NumberMath {
3135

32-
// This is an arbitrary value, picked as a reasonable choice for a precision
33-
// for typical user math when a non-terminating result would otherwise occur.
36+
/**
37+
* Extra precision added during division when a non-terminating result would otherwise occur.
38+
* <p>
39+
* Configurable via system property "groovy.division.extra.precision", defaults to 10.
40+
*/
3441
public static final int DIVISION_EXTRA_PRECISION = SystemUtil.getIntegerSafe("groovy.division.extra.precision", 10);
3542

36-
//This is an arbitrary value, picked as a reasonable choice for a rounding point
37-
//for typical user math.
43+
/**
44+
* Minimum scale (decimal places) for division results.
45+
* <p>
46+
* Configurable via system property "groovy.division.min.scale", defaults to 10.
47+
*/
3848
public static final int DIVISION_MIN_SCALE = SystemUtil.getIntegerSafe("groovy.division.min.scale", 10);
3949

50+
/**
51+
* Singleton instance of BigDecimalMath.
52+
*/
4053
public static final BigDecimalMath INSTANCE = new BigDecimalMath();
4154

4255
private BigDecimalMath() {}

src/main/java/org/codehaus/groovy/runtime/typehandling/BigIntegerMath.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,16 @@
1919
package org.codehaus.groovy.runtime.typehandling;
2020

2121
/**
22-
* BigInteger NumberMath operations
22+
* Arbitrary-precision integer arithmetic operations.
23+
* <p>
24+
* Singleton instance providing NumberMath implementations for BigInteger-based operations.
25+
* Supports exact integer arithmetic without overflow, with support for all bitwise operations.
2326
*/
2427
public final class BigIntegerMath extends NumberMath {
2528

29+
/**
30+
* Singleton instance of BigIntegerMath.
31+
*/
2632
public static final BigIntegerMath INSTANCE = new BigIntegerMath();
2733

2834
private BigIntegerMath() {}

0 commit comments

Comments
 (0)