You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(36) |
Apr
(36) |
May
(127) |
Jun
(193) |
Jul
(12) |
Aug
(46) |
Sep
(66) |
Oct
(28) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(39) |
Feb
(68) |
Mar
(58) |
Apr
(88) |
May
(40) |
Jun
(82) |
Jul
(213) |
Aug
(19) |
Sep
(2) |
Oct
(26) |
Nov
(2) |
Dec
|
| 2008 |
Jan
(5) |
Feb
(30) |
Mar
(26) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
(4) |
Apr
(44) |
May
(1) |
Jun
(9) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
(4) |
Feb
(4) |
Mar
|
Apr
(7) |
May
(35) |
Jun
|
Jul
|
Aug
(48) |
Sep
(10) |
Oct
(1) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(40) |
| 2017 |
Jan
(82) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(37) |
Mar
(28) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(7) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(27) |
| 2021 |
Jan
(52) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(8) |
Nov
(72) |
Dec
(100) |
| 2022 |
Jan
(119) |
Feb
(94) |
Mar
(4) |
Apr
|
May
|
Jun
(5) |
Jul
(3) |
Aug
(2) |
Sep
|
Oct
|
Nov
(10) |
Dec
(97) |
| 2023 |
Jan
(52) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(17) |
Sep
(21) |
Oct
(8) |
Nov
|
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(11) |
Feb
(1) |
Mar
|
Apr
(27) |
May
(62) |
Jun
(27) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2026 |
Jan
(14) |
Feb
(55) |
Mar
(49) |
Apr
(20) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <vic...@us...> - 2026-04-26 17:13:56
|
Revision: 3021
http://sourceforge.net/p/axsl/code/3021
Author: victormote
Date: 2026-04-26 17:13:53 +0000 (Sun, 26 Apr 2026)
Log Message:
-----------
Change method names, for greater consistency with BigDecimal. Also, reverse the order of scale and unscaledValue, also for consistency with BigDecimal.
Modified Paths:
--------------
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32.java
trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimal32Tests.java
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32.java 2026-04-26 15:29:01 UTC (rev 3020)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32.java 2026-04-26 17:13:53 UTC (rev 3021)
@@ -26,9 +26,9 @@
import java.math.BigDecimal;
/**
- * Subclasses are 32-bit implementations of fixed decimal numeric values.
+ * <p>Subclasses are 32-bit implementations of fixed decimal numeric values.
* The unscaledValue is stored in this superclass.
- * The scale is supplied by subclasses.
+ * The scale is supplied by subclasses.</p>
*/
public abstract class FixedDecimal32 implements FixedDecimal {
@@ -112,8 +112,9 @@
* @param unscaledValue The unscaledValue of the fixed-point to be acquired.
* @return An instance matching {@code scale} and {@code unscaledValue}.
* @throws IllegalArgumentException For an unknown scale.
+ * @see BigDecimal#valueOf(long, int)
*/
- public static FixedDecimal32 acquire(final int scale, final int unscaledValue) {
+ public static FixedDecimal32 valueOf(final int unscaledValue, final int scale) {
switch (scale) {
case SCALE_00: return new FixedDecimal32_00(unscaledValue);
case SCALE_01: return new FixedDecimal32_01(unscaledValue);
@@ -129,8 +130,8 @@
* @return An instance whose values match {@code bd}.
* @see org.axsl.primitive.fixed.FixedBigDecimal#FixedBigDecimal(BigDecimal)
*/
- public static FixedDecimal32 acquire(final BigDecimal bd) {
- return acquire(bd.scale(), bd.unscaledValue().intValueExact());
+ public static FixedDecimal32 valueOf(final BigDecimal bd) {
+ return valueOf(bd.unscaledValue().intValueExact(), bd.scale());
}
/**
@@ -139,17 +140,17 @@
* @return An instance matching {@code numeric}.
* @throws NumberFormatException For invalid values of {@code numeric}.
*/
- public static FixedDecimal32 acquire(final CharSequence numeric) {
+ public static FixedDecimal32 valueOf(final CharSequence numeric) {
final String numericString = numeric.toString();
final int decimalIndex = numericString.indexOf('.');
if (decimalIndex < 0) {
- return acquire(0, Integer.parseInt(numericString));
+ return valueOf(Integer.parseInt(numericString), 0);
}
final int scale = numeric.length() - decimalIndex - 1;
final StringBuilder builder = new StringBuilder(numericString);
builder.deleteCharAt(decimalIndex);
final int unscaledValue = Integer.parseInt(builder.toString());
- return acquire(scale, unscaledValue);
+ return valueOf(unscaledValue, scale);
}
/**
@@ -192,7 +193,7 @@
return this.unscaledValue - other.unscaledValue();
}
final FixedDecimal32 other4a = other instanceof FixedDecimal32 ? (FixedDecimal32) other :
- FixedDecimal32.acquire(other.scale(), other.unscaledValue());
+ FixedDecimal32.valueOf(other.unscaledValue(), other.scale());
final int whole1 = this.whole();
final int whole2 = other4a.whole();
if (whole1 == whole2) {
@@ -206,25 +207,25 @@
@Override
public FixedDecimal add(final FixedDecimal addend) {
final BigDecimal result = toBigDecimal().add(addend.toBigDecimal());
- return acquire(result);
+ return valueOf(result);
}
@Override
public FixedDecimal subtract(final FixedDecimal subtrahend) {
final BigDecimal result = toBigDecimal().subtract(subtrahend.toBigDecimal());
- return acquire(result);
+ return valueOf(result);
}
@Override
public FixedDecimal multiply(final FixedDecimal multiplier) {
final BigDecimal result = toBigDecimal().multiply(multiplier.toBigDecimal());
- return acquire(result);
+ return valueOf(result);
}
@Override
public FixedDecimal divide(final FixedDecimal divisor) {
final BigDecimal result = toBigDecimal().divide(divisor.toBigDecimal());
- return acquire(result);
+ return valueOf(result);
}
}
Modified: trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimal32Tests.java
===================================================================
--- trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimal32Tests.java 2026-04-26 15:29:01 UTC (rev 3020)
+++ trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimal32Tests.java 2026-04-26 17:13:53 UTC (rev 3021)
@@ -33,29 +33,29 @@
public class FixedDecimal32Tests {
/**
- * Tests of {@link FixedDecimal32#acquire(int, int)}.
+ * Tests of {@link FixedDecimal32#valueOf(int, int)}.
*/
@Test
public void testNumericFactory() {
- FixedDecimal out = FixedDecimal32.acquire(0, 112);
+ FixedDecimal out = FixedDecimal32.valueOf(112, 0);
assertThat(out.scale()).isEqualTo(0);
assertThat(out.unscaledValue()).isEqualTo(112);
- out = FixedDecimal32.acquire(3, 147_339);
+ out = FixedDecimal32.valueOf(147_339, 3);
assertThat(out.scale()).isEqualTo(3);
assertThat(out.unscaledValue()).isEqualTo(147_339);
}
/**
- * Tests of {@link FixedDecimal32#acquire(String)}.
+ * Tests of {@link FixedDecimal32#valueOf(String)}.
*/
@Test
public void testStringFactory() {
- FixedDecimal out = FixedDecimal32.acquire("112");
+ FixedDecimal out = FixedDecimal32.valueOf("112");
assertThat(out.scale()).isEqualTo(0);
assertThat(out.unscaledValue()).isEqualTo(112);
- out = FixedDecimal32.acquire("147.339");
+ out = FixedDecimal32.valueOf("147.339");
assertThat(out.scale()).isEqualTo(3);
assertThat(out.unscaledValue()).isEqualTo(147_339);
}
@@ -65,10 +65,10 @@
*/
@Test
public void testWhole() {
- FixedDecimal32 out = FixedDecimal32.acquire(0, 112);
+ FixedDecimal32 out = FixedDecimal32.valueOf(112, 0);
assertThat(out.whole()).isEqualTo(112);
- out = FixedDecimal32.acquire("147.339");
+ out = FixedDecimal32.valueOf("147.339");
assertThat(out.whole()).isEqualTo(147);
}
@@ -77,10 +77,10 @@
*/
@Test
public void testFractional() {
- FixedDecimal32 out = FixedDecimal32.acquire(0, 112);
+ FixedDecimal32 out = FixedDecimal32.valueOf(112, 0);
assertThat(out.fractional()).isEqualTo(0);
- out = FixedDecimal32.acquire("147.339");
+ out = FixedDecimal32.valueOf("147.339");
assertThat(out.fractional()).isEqualTo(339);
}
@@ -89,24 +89,24 @@
*/
@Test
public void testCompareTo() {
- FixedDecimal32 low = FixedDecimal32.acquire("112");
- FixedDecimal32 high = FixedDecimal32.acquire("113");
+ FixedDecimal32 low = FixedDecimal32.valueOf("112");
+ FixedDecimal32 high = FixedDecimal32.valueOf("113");
assertThat(high.compareTo(low)).isGreaterThan(0);
- low = FixedDecimal32.acquire("2147483.646");
- high = FixedDecimal32.acquire("2147483.647");
+ low = FixedDecimal32.valueOf("2147483.646");
+ high = FixedDecimal32.valueOf("2147483.647");
assertThat(high.compareTo(low)).isGreaterThan(0);
- low = FixedDecimal32.acquire(".646");
- high = FixedDecimal32.acquire(".647");
+ low = FixedDecimal32.valueOf(".646");
+ high = FixedDecimal32.valueOf(".647");
assertThat(high.compareTo(low)).isGreaterThan(0);
- low = FixedDecimal32.acquire("110.646");
- high = FixedDecimal32.acquire("110.646");
+ low = FixedDecimal32.valueOf("110.646");
+ high = FixedDecimal32.valueOf("110.646");
assertThat(high.compareTo(low)).isEqualTo(0);
- low = FixedDecimal32.acquire("110.64");
- high = FixedDecimal32.acquire("110.641");
+ low = FixedDecimal32.valueOf("110.64");
+ high = FixedDecimal32.valueOf("110.641");
assertThat(high.compareTo(low)).isGreaterThan(0);
}
@@ -115,24 +115,24 @@
*/
@Test
public void testIsEqualTo() {
- FixedDecimal32 value1 = FixedDecimal32.acquire("112");
- FixedDecimal32 value2 = FixedDecimal32.acquire("113");
+ FixedDecimal32 value1 = FixedDecimal32.valueOf("112");
+ FixedDecimal32 value2 = FixedDecimal32.valueOf("113");
assertThat(value1.isEqualTo(value2)).isFalse();
- value1 = FixedDecimal32.acquire("2147483.646");
- value2 = FixedDecimal32.acquire("2147483.647");
+ value1 = FixedDecimal32.valueOf("2147483.646");
+ value2 = FixedDecimal32.valueOf("2147483.647");
assertThat(value1.isEqualTo(value2)).isFalse();
- value1 = FixedDecimal32.acquire(".646");
- value2 = FixedDecimal32.acquire(".647");
+ value1 = FixedDecimal32.valueOf(".646");
+ value2 = FixedDecimal32.valueOf(".647");
assertThat(value1.isEqualTo(value2)).isFalse();
- value1 = FixedDecimal32.acquire("110.646");
- value2 = FixedDecimal32.acquire("110.646");
+ value1 = FixedDecimal32.valueOf("110.646");
+ value2 = FixedDecimal32.valueOf("110.646");
assertThat(value1.isEqualTo(value2)).isTrue();
- value1 = FixedDecimal32.acquire("110.64");
- value2 = FixedDecimal32.acquire("110.641");
+ value1 = FixedDecimal32.valueOf("110.64");
+ value2 = FixedDecimal32.valueOf("110.641");
assertThat(value1.isEqualTo(value2)).isFalse();
}
@@ -141,24 +141,24 @@
*/
@Test
public void testIsNotEqualTo() {
- FixedDecimal32 value1 = FixedDecimal32.acquire("112");
- FixedDecimal32 value2 = FixedDecimal32.acquire("113");
+ FixedDecimal32 value1 = FixedDecimal32.valueOf("112");
+ FixedDecimal32 value2 = FixedDecimal32.valueOf("113");
assertThat(value1.isNotEqualTo(value2)).isTrue();
- value1 = FixedDecimal32.acquire("2147483.646");
- value2 = FixedDecimal32.acquire("2147483.647");
+ value1 = FixedDecimal32.valueOf("2147483.646");
+ value2 = FixedDecimal32.valueOf("2147483.647");
assertThat(value1.isNotEqualTo(value2)).isTrue();
- value1 = FixedDecimal32.acquire(".646");
- value2 = FixedDecimal32.acquire(".647");
+ value1 = FixedDecimal32.valueOf(".646");
+ value2 = FixedDecimal32.valueOf(".647");
assertThat(value1.isNotEqualTo(value2)).isTrue();
- value1 = FixedDecimal32.acquire("110.646");
- value2 = FixedDecimal32.acquire("110.646");
+ value1 = FixedDecimal32.valueOf("110.646");
+ value2 = FixedDecimal32.valueOf("110.646");
assertThat(value1.isNotEqualTo(value2)).isFalse();
- value1 = FixedDecimal32.acquire("110.64");
- value2 = FixedDecimal32.acquire("110.641");
+ value1 = FixedDecimal32.valueOf("110.64");
+ value2 = FixedDecimal32.valueOf("110.641");
assertThat(value1.isNotEqualTo(value2)).isTrue();
}
@@ -167,24 +167,24 @@
*/
@Test
public void testIsGreaterThan() {
- FixedDecimal32 value1 = FixedDecimal32.acquire("113");
- FixedDecimal32 value2 = FixedDecimal32.acquire("112");
+ FixedDecimal32 value1 = FixedDecimal32.valueOf("113");
+ FixedDecimal32 value2 = FixedDecimal32.valueOf("112");
assertThat(value1.isGreaterThan(value2)).isTrue();
- value1 = FixedDecimal32.acquire("2147483.646");
- value2 = FixedDecimal32.acquire("2147483.647");
+ value1 = FixedDecimal32.valueOf("2147483.646");
+ value2 = FixedDecimal32.valueOf("2147483.647");
assertThat(value1.isGreaterThan(value2)).isFalse();
- value1 = FixedDecimal32.acquire(".647");
- value2 = FixedDecimal32.acquire(".646");
+ value1 = FixedDecimal32.valueOf(".647");
+ value2 = FixedDecimal32.valueOf(".646");
assertThat(value1.isGreaterThan(value2)).isTrue();
- value1 = FixedDecimal32.acquire("110.646");
- value2 = FixedDecimal32.acquire("110.646");
+ value1 = FixedDecimal32.valueOf("110.646");
+ value2 = FixedDecimal32.valueOf("110.646");
assertThat(value1.isGreaterThan(value2)).isFalse();
- value1 = FixedDecimal32.acquire("110.64");
- value2 = FixedDecimal32.acquire("110.641");
+ value1 = FixedDecimal32.valueOf("110.64");
+ value2 = FixedDecimal32.valueOf("110.641");
assertThat(value1.isGreaterThan(value2)).isFalse();
}
@@ -193,24 +193,24 @@
*/
@Test
public void testIsNotGreaterThan() {
- FixedDecimal32 value1 = FixedDecimal32.acquire("113");
- FixedDecimal32 value2 = FixedDecimal32.acquire("112");
+ FixedDecimal32 value1 = FixedDecimal32.valueOf("113");
+ FixedDecimal32 value2 = FixedDecimal32.valueOf("112");
assertThat(value1.isNotGreaterThan(value2)).isFalse();
- value1 = FixedDecimal32.acquire("2147483.646");
- value2 = FixedDecimal32.acquire("2147483.647");
+ value1 = FixedDecimal32.valueOf("2147483.646");
+ value2 = FixedDecimal32.valueOf("2147483.647");
assertThat(value1.isNotGreaterThan(value2)).isTrue();
- value1 = FixedDecimal32.acquire(".647");
- value2 = FixedDecimal32.acquire(".646");
+ value1 = FixedDecimal32.valueOf(".647");
+ value2 = FixedDecimal32.valueOf(".646");
assertThat(value1.isNotGreaterThan(value2)).isFalse();
- value1 = FixedDecimal32.acquire("110.646");
- value2 = FixedDecimal32.acquire("110.646");
+ value1 = FixedDecimal32.valueOf("110.646");
+ value2 = FixedDecimal32.valueOf("110.646");
assertThat(value1.isNotGreaterThan(value2)).isTrue();
- value1 = FixedDecimal32.acquire("110.64");
- value2 = FixedDecimal32.acquire("110.641");
+ value1 = FixedDecimal32.valueOf("110.64");
+ value2 = FixedDecimal32.valueOf("110.641");
assertThat(value1.isNotGreaterThan(value2)).isTrue();
}
@@ -219,24 +219,24 @@
*/
@Test
public void testIsLessThan() {
- FixedDecimal32 value1 = FixedDecimal32.acquire("113");
- FixedDecimal32 value2 = FixedDecimal32.acquire("112");
+ FixedDecimal32 value1 = FixedDecimal32.valueOf("113");
+ FixedDecimal32 value2 = FixedDecimal32.valueOf("112");
assertThat(value1.isLessThan(value2)).isFalse();
- value1 = FixedDecimal32.acquire("2147483.646");
- value2 = FixedDecimal32.acquire("2147483.647");
+ value1 = FixedDecimal32.valueOf("2147483.646");
+ value2 = FixedDecimal32.valueOf("2147483.647");
assertThat(value1.isLessThan(value2)).isTrue();
- value1 = FixedDecimal32.acquire(".647");
- value2 = FixedDecimal32.acquire(".646");
+ value1 = FixedDecimal32.valueOf(".647");
+ value2 = FixedDecimal32.valueOf(".646");
assertThat(value1.isLessThan(value2)).isFalse();
- value1 = FixedDecimal32.acquire("110.646");
- value2 = FixedDecimal32.acquire("110.646");
+ value1 = FixedDecimal32.valueOf("110.646");
+ value2 = FixedDecimal32.valueOf("110.646");
assertThat(value1.isLessThan(value2)).isFalse();
- value1 = FixedDecimal32.acquire("110.64");
- value2 = FixedDecimal32.acquire("110.641");
+ value1 = FixedDecimal32.valueOf("110.64");
+ value2 = FixedDecimal32.valueOf("110.641");
assertThat(value1.isLessThan(value2)).isTrue();
}
@@ -245,24 +245,24 @@
*/
@Test
public void testIsNotLessThan() {
- FixedDecimal32 value1 = FixedDecimal32.acquire("113");
- FixedDecimal32 value2 = FixedDecimal32.acquire("112");
+ FixedDecimal32 value1 = FixedDecimal32.valueOf("113");
+ FixedDecimal32 value2 = FixedDecimal32.valueOf("112");
assertThat(value1.isNotLessThan(value2)).isTrue();
- value1 = FixedDecimal32.acquire("2147483.646");
- value2 = FixedDecimal32.acquire("2147483.647");
+ value1 = FixedDecimal32.valueOf("2147483.646");
+ value2 = FixedDecimal32.valueOf("2147483.647");
assertThat(value1.isNotLessThan(value2)).isFalse();
- value1 = FixedDecimal32.acquire(".647");
- value2 = FixedDecimal32.acquire(".646");
+ value1 = FixedDecimal32.valueOf(".647");
+ value2 = FixedDecimal32.valueOf(".646");
assertThat(value1.isNotLessThan(value2)).isTrue();
- value1 = FixedDecimal32.acquire("110.646");
- value2 = FixedDecimal32.acquire("110.646");
+ value1 = FixedDecimal32.valueOf("110.646");
+ value2 = FixedDecimal32.valueOf("110.646");
assertThat(value1.isNotLessThan(value2)).isTrue();
- value1 = FixedDecimal32.acquire("110.64");
- value2 = FixedDecimal32.acquire("110.641");
+ value1 = FixedDecimal32.valueOf("110.64");
+ value2 = FixedDecimal32.valueOf("110.641");
assertThat(value1.isNotLessThan(value2)).isFalse();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-26 15:29:04
|
Revision: 3020
http://sourceforge.net/p/axsl/code/3020
Author: victormote
Date: 2026-04-26 15:29:01 +0000 (Sun, 26 Apr 2026)
Log Message:
-----------
Rename FixedDecimal implementation classes for clarity.
Modified Paths:
--------------
trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml
Added Paths:
-----------
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_00.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_01.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_02.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_03.java
trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimal32Tests.java
Removed Paths:
-------------
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimalImpl.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_00.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_01.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_02.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_03.java
trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimalImplTests.java
Modified: trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml
===================================================================
--- trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml 2026-04-26 02:04:49 UTC (rev 3019)
+++ trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml 2026-04-26 15:29:01 UTC (rev 3020)
@@ -344,6 +344,13 @@
<property name="checkFormat" value="RegexpSinglelineJava"/>
</module>
+ <!-- Allow BigDecimal where explicitly needed. -->
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="Checkstyle: Allow BigDecimal here."/>
+ <property name="onCommentFormat" value="Checkstyle: Restart BigDecimal checking."/>
+ <property name="checkFormat" value="RegexpSinglelineJava"/>
+ </module>
+
<module name="MissingOverride"/>
</module>
Copied: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32.java (from rev 3019, trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimalImpl.java)
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32.java 2026-04-26 15:29:01 UTC (rev 3020)
@@ -0,0 +1,230 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate $
+ * $LastChangedBy$
+ */
+
+package org.axsl.primitive.fixed;
+
+import java.math.BigDecimal;
+
+/**
+ * Subclasses are 32-bit implementations of fixed decimal numeric values.
+ * The unscaledValue is stored in this superclass.
+ * The scale is supplied by subclasses.
+ */
+public abstract class FixedDecimal32 implements FixedDecimal {
+
+ /** Constant for the scale of 0. */
+ protected static final int SCALE_00 = 0;
+
+ /** Constant for the scale of 1. */
+ protected static final int SCALE_01 = 1;
+
+ /** Constant for the scale of 2. */
+ protected static final int SCALE_02 = 2;
+
+ /** Constant for the scale of 3. */
+ protected static final int SCALE_03 = 3;
+
+ /**
+ * Enumeration of configurations for fixed-point classes.
+ */
+ enum Config {
+
+ /** Scale of 0. */
+ CONFIG_00(0, 1),
+
+ /** Scale of 1. */
+ CONFIG_01(1, 10),
+
+ /** Scale of 2. */
+ CONFIG_02(2, 100),
+
+ /** Scale of 3. */
+ CONFIG_03(3, 1000);
+
+ /** The scale for this configuration. */
+ private int scale;
+
+ /** The conversion factor. */
+ private int conversionFactor;
+
+ /**
+ * Constructor.
+ * @param scale The scale for this configuration.
+ * @param conversionFactor The conversion factor for this configuration.
+ */
+ Config(final int scale, final int conversionFactor) {
+ this.scale = scale;
+ this.conversionFactor = conversionFactor;
+ }
+
+ /**
+ * Returns the scale for this configuration.
+ * @return The scale for this configuration.
+ */
+ public int getScale() {
+ return this.scale;
+ }
+
+ /**
+ * Returns the conversionFactor for this configuration.
+ * @return The conversionFactor for this configuration.
+ */
+ public int getConversionFactor() {
+ return this.conversionFactor;
+ }
+
+ }
+
+ /** The unscaledValue of this fixed-point value. */
+ private int unscaledValue;
+
+ /**
+ * Constructor.
+ * @param unscaledValue The unscaledValue of this fixed-point value.
+ */
+ protected FixedDecimal32(final int unscaledValue) {
+ this.unscaledValue = unscaledValue;
+ }
+
+ /**
+ * Factory method.
+ * @param scale The scale of the fixed-point to be acquired.
+ * @param unscaledValue The unscaledValue of the fixed-point to be acquired.
+ * @return An instance matching {@code scale} and {@code unscaledValue}.
+ * @throws IllegalArgumentException For an unknown scale.
+ */
+ public static FixedDecimal32 acquire(final int scale, final int unscaledValue) {
+ switch (scale) {
+ case SCALE_00: return new FixedDecimal32_00(unscaledValue);
+ case SCALE_01: return new FixedDecimal32_01(unscaledValue);
+ case SCALE_02: return new FixedDecimal32_02(unscaledValue);
+ case SCALE_03: return new FixedDecimal32_03(unscaledValue);
+ }
+ throw new IllegalArgumentException("Implementation not found for scale: " + scale);
+ }
+
+ /**
+ * Factory method.
+ * @param bd The BigDecimal to be converted to an instance of {@link FixedDecimal32}.
+ * @return An instance whose values match {@code bd}.
+ * @see org.axsl.primitive.fixed.FixedBigDecimal#FixedBigDecimal(BigDecimal)
+ */
+ public static FixedDecimal32 acquire(final BigDecimal bd) {
+ return acquire(bd.scale(), bd.unscaledValue().intValueExact());
+ }
+
+ /**
+ * Factory method.
+ * @param numeric The numeric string to be converted to a fixed-point.
+ * @return An instance matching {@code numeric}.
+ * @throws NumberFormatException For invalid values of {@code numeric}.
+ */
+ public static FixedDecimal32 acquire(final CharSequence numeric) {
+ final String numericString = numeric.toString();
+ final int decimalIndex = numericString.indexOf('.');
+ if (decimalIndex < 0) {
+ return acquire(0, Integer.parseInt(numericString));
+ }
+ final int scale = numeric.length() - decimalIndex - 1;
+ final StringBuilder builder = new StringBuilder(numericString);
+ builder.deleteCharAt(decimalIndex);
+ final int unscaledValue = Integer.parseInt(builder.toString());
+ return acquire(scale, unscaledValue);
+ }
+
+ /**
+ * Returns the configuration.
+ * @return The configuration.
+ */
+ public abstract Config getConfig();
+
+ @Override
+ public int unscaledValue() {
+ return this.unscaledValue;
+ }
+
+ @Override
+ public int scale() {
+ return getConfig().getScale();
+ }
+
+ /**
+ * Returns the whole number portion of this fixed-point.
+ * @return The whole number portion of this.
+ * For example, for 123.456, returns 123.
+ */
+ public int whole() {
+ return this.unscaledValue / getConfig().conversionFactor;
+ }
+
+ /**
+ * Returns the fractional portion of this fixed-point.
+ * @return The fractional portion of this.
+ * For example, for 123.456, returns 456.
+ */
+ public int fractional() {
+ return this.unscaledValue % getConfig().conversionFactor;
+ }
+
+ @Override
+ public int compareTo(final FixedDecimal other) {
+ if (this.scale() == other.scale()) {
+ return this.unscaledValue - other.unscaledValue();
+ }
+ final FixedDecimal32 other4a = other instanceof FixedDecimal32 ? (FixedDecimal32) other :
+ FixedDecimal32.acquire(other.scale(), other.unscaledValue());
+ final int whole1 = this.whole();
+ final int whole2 = other4a.whole();
+ if (whole1 == whole2) {
+ final int fractional1 = this.fractional();
+ final int fractional2 = other4a.fractional();
+ return fractional1 - fractional2;
+ }
+ return whole1 - whole2;
+ }
+
+ @Override
+ public FixedDecimal add(final FixedDecimal addend) {
+ final BigDecimal result = toBigDecimal().add(addend.toBigDecimal());
+ return acquire(result);
+ }
+
+ @Override
+ public FixedDecimal subtract(final FixedDecimal subtrahend) {
+ final BigDecimal result = toBigDecimal().subtract(subtrahend.toBigDecimal());
+ return acquire(result);
+ }
+
+ @Override
+ public FixedDecimal multiply(final FixedDecimal multiplier) {
+ final BigDecimal result = toBigDecimal().multiply(multiplier.toBigDecimal());
+ return acquire(result);
+ }
+
+ @Override
+ public FixedDecimal divide(final FixedDecimal divisor) {
+ final BigDecimal result = toBigDecimal().divide(divisor.toBigDecimal());
+ return acquire(result);
+ }
+
+}
Copied: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_00.java (from rev 3019, trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_00.java)
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_00.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_00.java 2026-04-26 15:29:01 UTC (rev 3020)
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate $
+ * $LastChangedBy$
+ */
+
+package org.axsl.primitive.fixed;
+
+/**
+ * A fixed-point value with a scale of 0.
+ * This is the functional equivalent of {@link java.lang.Integer}.
+ */
+public class FixedDecimal32_00 extends FixedDecimal32 {
+
+ /**
+ * Constructor.
+ * @param unscaledValue The unscaledValue of this fixed-point value.
+ */
+ protected FixedDecimal32_00(final int unscaledValue) {
+ super(unscaledValue);
+ }
+
+ @Override
+ public Config getConfig() {
+ return Config.CONFIG_00;
+ }
+
+}
Copied: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_01.java (from rev 3019, trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_01.java)
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_01.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_01.java 2026-04-26 15:29:01 UTC (rev 3020)
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate $
+ * $LastChangedBy$
+ */
+
+package org.axsl.primitive.fixed;
+
+/**
+ * A fixed-point value with a scale of 1.
+ */
+public class FixedDecimal32_01 extends FixedDecimal32 {
+
+ /**
+ * Constructor.
+ * @param unscaledValue The unscaledValue of this fixed-point value.
+ */
+ protected FixedDecimal32_01(final int unscaledValue) {
+ super(unscaledValue);
+ }
+
+ @Override
+ public Config getConfig() {
+ return Config.CONFIG_01;
+ }
+
+}
Copied: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_02.java (from rev 3019, trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_02.java)
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_02.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_02.java 2026-04-26 15:29:01 UTC (rev 3020)
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate $
+ * $LastChangedBy$
+ */
+
+package org.axsl.primitive.fixed;
+
+/**
+ * A fixed-point value with a scale of 2.
+ */
+public class FixedDecimal32_02 extends FixedDecimal32 {
+
+ /**
+ * Constructor.
+ * @param unscaledValue The unscaledValue of this fixed-point value.
+ */
+ protected FixedDecimal32_02(final int unscaledValue) {
+ super(unscaledValue);
+ }
+
+ @Override
+ public Config getConfig() {
+ return Config.CONFIG_02;
+ }
+
+}
Copied: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_03.java (from rev 3019, trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_03.java)
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_03.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal32_03.java 2026-04-26 15:29:01 UTC (rev 3020)
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate $
+ * $LastChangedBy$
+ */
+
+package org.axsl.primitive.fixed;
+
+/**
+ * A fixed-point value with a scale of 3.
+ */
+public class FixedDecimal32_03 extends FixedDecimal32 {
+
+ /**
+ * Constructor.
+ * @param unscaledValue The unscaledValue of this fixed-point value.
+ */
+ protected FixedDecimal32_03(final int unscaledValue) {
+ super(unscaledValue);
+ }
+
+ @Override
+ public Config getConfig() {
+ return Config.CONFIG_03;
+ }
+
+}
Deleted: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimalImpl.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimalImpl.java 2026-04-26 02:04:49 UTC (rev 3019)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimalImpl.java 2026-04-26 15:29:01 UTC (rev 3020)
@@ -1,230 +0,0 @@
-/*
- * Copyright 2026 The aXSL Project.
- * http://www.axsl.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate $
- * $LastChangedBy$
- */
-
-package org.axsl.primitive.fixed;
-
-import java.math.BigDecimal;
-
-/**
- * Subclasses are 32-bit implementations of fixed decimal numeric values.
- * The unscaledValue is stored in this superclass.
- * The scale is supplied by subclasses.
- */
-public abstract class FixedDecimalImpl implements FixedDecimal {
-
- /** Constant for the scale of 0. */
- protected static final int SCALE_00 = 0;
-
- /** Constant for the scale of 1. */
- protected static final int SCALE_01 = 1;
-
- /** Constant for the scale of 2. */
- protected static final int SCALE_02 = 2;
-
- /** Constant for the scale of 3. */
- protected static final int SCALE_03 = 3;
-
- /**
- * Enumeration of configurations for fixed-point classes.
- */
- enum Config {
-
- /** Scale of 0. */
- CONFIG_00(0, 1),
-
- /** Scale of 1. */
- CONFIG_01(1, 10),
-
- /** Scale of 2. */
- CONFIG_02(2, 100),
-
- /** Scale of 3. */
- CONFIG_03(3, 1000);
-
- /** The scale for this configuration. */
- private int scale;
-
- /** The conversion factor. */
- private int conversionFactor;
-
- /**
- * Constructor.
- * @param scale The scale for this configuration.
- * @param conversionFactor The conversion factor for this configuration.
- */
- Config(final int scale, final int conversionFactor) {
- this.scale = scale;
- this.conversionFactor = conversionFactor;
- }
-
- /**
- * Returns the scale for this configuration.
- * @return The scale for this configuration.
- */
- public int getScale() {
- return this.scale;
- }
-
- /**
- * Returns the conversionFactor for this configuration.
- * @return The conversionFactor for this configuration.
- */
- public int getConversionFactor() {
- return this.conversionFactor;
- }
-
- }
-
- /** The unscaledValue of this fixed-point value. */
- private int unscaledValue;
-
- /**
- * Constructor.
- * @param unscaledValue The unscaledValue of this fixed-point value.
- */
- protected FixedDecimalImpl(final int unscaledValue) {
- this.unscaledValue = unscaledValue;
- }
-
- /**
- * Factory method.
- * @param scale The scale of the fixed-point to be acquired.
- * @param unscaledValue The unscaledValue of the fixed-point to be acquired.
- * @return An instance matching {@code scale} and {@code unscaledValue}.
- * @throws IllegalArgumentException For an unknown scale.
- */
- public static FixedDecimalImpl acquire(final int scale, final int unscaledValue) {
- switch (scale) {
- case SCALE_00: return new FixedDecimal_00(unscaledValue);
- case SCALE_01: return new FixedDecimal_01(unscaledValue);
- case SCALE_02: return new FixedDecimal_02(unscaledValue);
- case SCALE_03: return new FixedDecimal_03(unscaledValue);
- }
- throw new IllegalArgumentException("Implementation not found for scale: " + scale);
- }
-
- /**
- * Factory method.
- * @param bd The BigDecimal to be converted to an instance of {@link FixedDecimalImpl}.
- * @return An instance whose values match {@code bd}.
- * @see org.axsl.primitive.fixed.FixedBigDecimal#FixedBigDecimal(BigDecimal)
- */
- public static FixedDecimalImpl acquire(final BigDecimal bd) {
- return acquire(bd.scale(), bd.unscaledValue().intValueExact());
- }
-
- /**
- * Factory method.
- * @param numeric The numeric string to be converted to a fixed-point.
- * @return An instance matching {@code numeric}.
- * @throws NumberFormatException For invalid values of {@code numeric}.
- */
- public static FixedDecimalImpl acquire(final CharSequence numeric) {
- final String numericString = numeric.toString();
- final int decimalIndex = numericString.indexOf('.');
- if (decimalIndex < 0) {
- return acquire(0, Integer.parseInt(numericString));
- }
- final int scale = numeric.length() - decimalIndex - 1;
- final StringBuilder builder = new StringBuilder(numericString);
- builder.deleteCharAt(decimalIndex);
- final int unscaledValue = Integer.parseInt(builder.toString());
- return acquire(scale, unscaledValue);
- }
-
- /**
- * Returns the configuration.
- * @return The configuration.
- */
- public abstract Config getConfig();
-
- @Override
- public int unscaledValue() {
- return this.unscaledValue;
- }
-
- @Override
- public int scale() {
- return getConfig().getScale();
- }
-
- /**
- * Returns the whole number portion of this fixed-point.
- * @return The whole number portion of this.
- * For example, for 123.456, returns 123.
- */
- public int whole() {
- return this.unscaledValue / getConfig().conversionFactor;
- }
-
- /**
- * Returns the fractional portion of this fixed-point.
- * @return The fractional portion of this.
- * For example, for 123.456, returns 456.
- */
- public int fractional() {
- return this.unscaledValue % getConfig().conversionFactor;
- }
-
- @Override
- public int compareTo(final FixedDecimal other) {
- if (this.scale() == other.scale()) {
- return this.unscaledValue - other.unscaledValue();
- }
- final FixedDecimalImpl other4a = other instanceof FixedDecimalImpl ? (FixedDecimalImpl) other :
- FixedDecimalImpl.acquire(other.scale(), other.unscaledValue());
- final int whole1 = this.whole();
- final int whole2 = other4a.whole();
- if (whole1 == whole2) {
- final int fractional1 = this.fractional();
- final int fractional2 = other4a.fractional();
- return fractional1 - fractional2;
- }
- return whole1 - whole2;
- }
-
- @Override
- public FixedDecimal add(final FixedDecimal addend) {
- final BigDecimal result = toBigDecimal().add(addend.toBigDecimal());
- return acquire(result);
- }
-
- @Override
- public FixedDecimal subtract(final FixedDecimal subtrahend) {
- final BigDecimal result = toBigDecimal().subtract(subtrahend.toBigDecimal());
- return acquire(result);
- }
-
- @Override
- public FixedDecimal multiply(final FixedDecimal multiplier) {
- final BigDecimal result = toBigDecimal().multiply(multiplier.toBigDecimal());
- return acquire(result);
- }
-
- @Override
- public FixedDecimal divide(final FixedDecimal divisor) {
- final BigDecimal result = toBigDecimal().divide(divisor.toBigDecimal());
- return acquire(result);
- }
-
-}
Deleted: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_00.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_00.java 2026-04-26 02:04:49 UTC (rev 3019)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_00.java 2026-04-26 15:29:01 UTC (rev 3020)
@@ -1,45 +0,0 @@
-/*
- * Copyright 2026 The aXSL Project.
- * http://www.axsl.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate $
- * $LastChangedBy$
- */
-
-package org.axsl.primitive.fixed;
-
-/**
- * A fixed-point value with a scale of 0.
- * This is the functional equivalent of {@link java.lang.Integer}.
- */
-public class FixedDecimal_00 extends FixedDecimalImpl {
-
- /**
- * Constructor.
- * @param unscaledValue The unscaledValue of this fixed-point value.
- */
- protected FixedDecimal_00(final int unscaledValue) {
- super(unscaledValue);
- }
-
- @Override
- public Config getConfig() {
- return Config.CONFIG_00;
- }
-
-}
Deleted: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_01.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_01.java 2026-04-26 02:04:49 UTC (rev 3019)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_01.java 2026-04-26 15:29:01 UTC (rev 3020)
@@ -1,44 +0,0 @@
-/*
- * Copyright 2026 The aXSL Project.
- * http://www.axsl.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate $
- * $LastChangedBy$
- */
-
-package org.axsl.primitive.fixed;
-
-/**
- * A fixed-point value with a scale of 1.
- */
-public class FixedDecimal_01 extends FixedDecimalImpl {
-
- /**
- * Constructor.
- * @param unscaledValue The unscaledValue of this fixed-point value.
- */
- protected FixedDecimal_01(final int unscaledValue) {
- super(unscaledValue);
- }
-
- @Override
- public Config getConfig() {
- return Config.CONFIG_01;
- }
-
-}
Deleted: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_02.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_02.java 2026-04-26 02:04:49 UTC (rev 3019)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_02.java 2026-04-26 15:29:01 UTC (rev 3020)
@@ -1,44 +0,0 @@
-/*
- * Copyright 2026 The aXSL Project.
- * http://www.axsl.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate $
- * $LastChangedBy$
- */
-
-package org.axsl.primitive.fixed;
-
-/**
- * A fixed-point value with a scale of 2.
- */
-public class FixedDecimal_02 extends FixedDecimalImpl {
-
- /**
- * Constructor.
- * @param unscaledValue The unscaledValue of this fixed-point value.
- */
- protected FixedDecimal_02(final int unscaledValue) {
- super(unscaledValue);
- }
-
- @Override
- public Config getConfig() {
- return Config.CONFIG_02;
- }
-
-}
Deleted: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_03.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_03.java 2026-04-26 02:04:49 UTC (rev 3019)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_03.java 2026-04-26 15:29:01 UTC (rev 3020)
@@ -1,44 +0,0 @@
-/*
- * Copyright 2026 The aXSL Project.
- * http://www.axsl.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate $
- * $LastChangedBy$
- */
-
-package org.axsl.primitive.fixed;
-
-/**
- * A fixed-point value with a scale of 3.
- */
-public class FixedDecimal_03 extends FixedDecimalImpl {
-
- /**
- * Constructor.
- * @param unscaledValue The unscaledValue of this fixed-point value.
- */
- protected FixedDecimal_03(final int unscaledValue) {
- super(unscaledValue);
- }
-
- @Override
- public Config getConfig() {
- return Config.CONFIG_03;
- }
-
-}
Copied: trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimal32Tests.java (from rev 3019, trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimalImplTests.java)
===================================================================
--- trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimal32Tests.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimal32Tests.java 2026-04-26 15:29:01 UTC (rev 3020)
@@ -0,0 +1,269 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate $
+ * $LastChangedBy$
+ */
+
+
+package org.axsl.primitive.fixed;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Tests of {@link FixedDecimal32}.
+ */
+public class FixedDecimal32Tests {
+
+ /**
+ * Tests of {@link FixedDecimal32#acquire(int, int)}.
+ */
+ @Test
+ public void testNumericFactory() {
+ FixedDecimal out = FixedDecimal32.acquire(0, 112);
+ assertThat(out.scale()).isEqualTo(0);
+ assertThat(out.unscaledValue()).isEqualTo(112);
+
+ out = FixedDecimal32.acquire(3, 147_339);
+ assertThat(out.scale()).isEqualTo(3);
+ assertThat(out.unscaledValue()).isEqualTo(147_339);
+ }
+
+ /**
+ * Tests of {@link FixedDecimal32#acquire(String)}.
+ */
+ @Test
+ public void testStringFactory() {
+ FixedDecimal out = FixedDecimal32.acquire("112");
+ assertThat(out.scale()).isEqualTo(0);
+ assertThat(out.unscaledValue()).isEqualTo(112);
+
+ out = FixedDecimal32.acquire("147.339");
+ assertThat(out.scale()).isEqualTo(3);
+ assertThat(out.unscaledValue()).isEqualTo(147_339);
+ }
+
+ /**
+ * Tests of {@link FixedDecimal32#whole()}.
+ */
+ @Test
+ public void testWhole() {
+ FixedDecimal32 out = FixedDecimal32.acquire(0, 112);
+ assertThat(out.whole()).isEqualTo(112);
+
+ out = FixedDecimal32.acquire("147.339");
+ assertThat(out.whole()).isEqualTo(147);
+ }
+
+ /**
+ * Tests of {@link FixedDecimal32#fractional()}.
+ */
+ @Test
+ public void testFractional() {
+ FixedDecimal32 out = FixedDecimal32.acquire(0, 112);
+ assertThat(out.fractional()).isEqualTo(0);
+
+ out = FixedDecimal32.acquire("147.339");
+ assertThat(out.fractional()).isEqualTo(339);
+ }
+
+ /**
+ * Tests of {@link FixedDecimal32#compareTo(FixedPoint)}.
+ */
+ @Test
+ public void testCompareTo() {
+ FixedDecimal32 low = FixedDecimal32.acquire("112");
+ FixedDecimal32 high = FixedDecimal32.acquire("113");
+ assertThat(high.compareTo(low)).isGreaterThan(0);
+
+ low = FixedDecimal32.acquire("2147483.646");
+ high = FixedDecimal32.acquire("2147483.647");
+ assertThat(high.compareTo(low)).isGreaterThan(0);
+
+ low = FixedDecimal32.acquire(".646");
+ high = FixedDecimal32.acquire(".647");
+ assertThat(high.compareTo(low)).isGreaterThan(0);
+
+ low = FixedDecimal32.acquire("110.646");
+ high = FixedDecimal32.acquire("110.646");
+ assertThat(high.compareTo(low)).isEqualTo(0);
+
+ low = FixedDecimal32.acquire("110.64");
+ high = FixedDecimal32.acquire("110.641");
+ assertThat(high.compareTo(low)).isGreaterThan(0);
+ }
+
+ /**
+ * Tests of {@link FixedDecimal32#isEqualTo(FixedPoint)}.
+ */
+ @Test
+ public void testIsEqualTo() {
+ FixedDecimal32 value1 = FixedDecimal32.acquire("112");
+ FixedDecimal32 value2 = FixedDecimal32.acquire("113");
+ assertThat(value1.isEqualTo(value2)).isFalse();
+
+ value1 = FixedDecimal32.acquire("2147483.646");
+ value2 = FixedDecimal32.acquire("2147483.647");
+ assertThat(value1.isEqualTo(value2)).isFalse();
+
+ value1 = FixedDecimal32.acquire(".646");
+ value2 = FixedDecimal32.acquire(".647");
+ assertThat(value1.isEqualTo(value2)).isFalse();
+
+ value1 = FixedDecimal32.acquire("110.646");
+ value2 = FixedDecimal32.acquire("110.646");
+ assertThat(value1.isEqualTo(value2)).isTrue();
+
+ value1 = FixedDecimal32.acquire("110.64");
+ value2 = FixedDecimal32.acquire("110.641");
+ assertThat(value1.isEqualTo(value2)).isFalse();
+ }
+
+ /**
+ * Tests of {@link FixedDecimal32#isNotEqualTo(FixedPoint)}.
+ */
+ @Test
+ public void testIsNotEqualTo() {
+ FixedDecimal32 value1 = FixedDecimal32.acquire("112");
+ FixedDecimal32 value2 = FixedDecimal32.acquire("113");
+ assertThat(value1.isNotEqualTo(value2)).isTrue();
+
+ value1 = FixedDecimal32.acquire("2147483.646");
+ value2 = FixedDecimal32.acquire("2147483.647");
+ assertThat(value1.isNotEqualTo(value2)).isTrue();
+
+ value1 = FixedDecimal32.acquire(".646");
+ value2 = FixedDecimal32.acquire(".647");
+ assertThat(value1.isNotEqualTo(value2)).isTrue();
+
+ value1 = FixedDecimal32.acquire("110.646");
+ value2 = FixedDecimal32.acquire("110.646");
+ assertThat(value1.isNotEqualTo(value2)).isFalse();
+
+ value1 = FixedDecimal32.acquire("110.64");
+ value2 = FixedDecimal32.acquire("110.641");
+ assertThat(value1.isNotEqualTo(value2)).isTrue();
+ }
+
+ /**
+ * Tests of {@link FixedDecimal32#isGreaterThan(FixedPoint)}.
+ */
+ @Test
+ public void testIsGreaterThan() {
+ FixedDecimal32 value1 = FixedDecimal32.acquire("113");
+ FixedDecimal32 value2 = FixedDecimal32.acquire("112");
+ assertThat(value1.isGreaterThan(value2)).isTrue();
+
+ value1 = FixedDecimal32.acquire("2147483.646");
+ value2 = FixedDecimal32.acquire("2147483.647");
+ assertThat(value1.isGreaterThan(value2)).isFalse();
+
+ value1 = FixedDecimal32.acquire(".647");
+ value2 = FixedDecimal32.acquire(".646");
+ assertThat(value1.isGreaterThan(value2)).isTrue();
+
+ value1 = FixedDecimal32.acquire("110.646");
+ value2 = FixedDecimal32.acquire("110.646");
+ assertThat(value1.isGreaterThan(value2)).isFalse();
+
+ value1 = FixedDecimal32.acquire("110.64");
+ value2 = FixedDecimal32.acquire("110.641");
+ assertThat(value1.isGreaterThan(value2)).isFalse();
+ }
+
+ /**
+ * Tests of {@link FixedDecimal32#isNotGreaterThan(FixedPoint)}.
+ */
+ @Test
+ public void testIsNotGreaterThan() {
+ FixedDecimal32 value1 = FixedDecimal32.acquire("113");
+ FixedDecimal32 value2 = FixedDecimal32.acquire("112");
+ assertThat(value1.isNotGreaterThan(value2)).isFalse();
+
+ value1 = FixedDecimal32.acquire("2147483.646");
+ value2 = FixedDecimal32.acquire("2147483.647");
+ assertThat(value1.isNotGreaterThan(value2)).isTrue();
+
+ value1 = FixedDecimal32.acquire(".647");
+ value2 = FixedDecimal32.acquire(".646");
+ assertThat(value1.isNotGreaterThan(value2)).isFalse();
+
+ value1 = FixedDecimal32.acquire("110.646");
+ value2 = FixedDecimal32.acquire("110.646");
+ assertThat(value1.isNotGreaterThan(value2)).isTrue();
+
+ value1 = FixedDecimal32.acquire("110.64");
+ value2 = FixedDecimal32.acquire("110.641");
+ assertThat(value1.isNotGreaterThan(value2)).isTrue();
+ }
+
+ /**
+ * Tests of {@link FixedDecimal32#isLessThan(FixedPoint)}.
+ */
+ @Test
+ public void testIsLessThan() {
+ FixedDecimal32 value1 = FixedDecimal32.acquire("113");
+ FixedDecimal32 value2 = FixedDecimal32.acquire("112");
+ assertThat(value1.isLessThan(value2)).isFalse();
+
+ value1 = FixedDecimal32.acquire("2147483.646");
+ value2 = FixedDecimal32.acquire("2147483.647");
+ assertThat(value1.isLessThan(value2)).isTrue();
+
+ value1 = FixedDecimal32.acquire(".647");
+ value2 = FixedDecimal32.acquire(".646");
+ assertThat(value1.isLessThan(value2)).isFalse();
+
+ value1 = FixedDecimal32.acquire("110.646");
+ value2 = FixedDecimal32.acquire("110.646");
+ assertThat(value1.isLessThan(value2)).isFalse();
+
+ value1 = FixedDecimal32.acquire("110.64");
+ value2 = FixedDecimal32.acquire("110.641");
+ assertThat(value1.isLessThan(value2)).isTrue();
+ }
+
+ /**
+ * Tests of {@link FixedDecimal32#isNotLessThan(FixedPoint)}.
+ */
+ @Test
+ public void testIsNotLessThan() {
+ FixedDecimal32 value1 = FixedDecimal32.acquire("113");
+ FixedDecimal32 value2 = FixedDecimal32.acquire("112");
+ assertThat(value1.isNotLessThan(value2)).isTrue();
+
+ value1 = FixedDecimal32.acquire("2147483.646");
+ value2 = FixedDecimal32.acquire("2147483.647");
+ assertThat(value1.isNotLessThan(value2)).isFalse();
+
+ value1 = FixedDecimal32.acquire(".647");
+ value2 = FixedDecimal32.acquire(".646");
+ assertThat(value1.isNotLessThan(value2)).isTrue();
+
+ value1 = FixedDecimal32.acquire("110.646");
+ value2 = FixedDecimal32.acquire("110.646");
+ assertThat(value1.isNotLessThan(value2)).isTrue();
+
+ value1 = FixedDecimal32.acquire("110.64");
+ value2 = FixedDecimal32.acquire("110.641");
+ assertThat(value1.isNotLessThan(value2)).isFalse();
+ }
+
+}
Deleted: trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimalImplTests.java
===================================================================
--- trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimalImplTests.java 2026-04-26 02:04:49 UTC (rev 3019)
+++ trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimalImplTests.java 2026-04-26 15:29:01 UTC (rev 3020)
@@ -1,269 +0,0 @@
-/*
- * Copyright 2026 The aXSL Project.
- * http://www.axsl.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate $
- * $LastChangedBy$
- */
-
-
-package org.axsl.primitive.fixed;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import org.junit.jupiter.api.Test;
-
-/**
- * Tests of {@link FixedDecimalImpl}.
- */
-public class FixedDecimalImplTests {
-
- /**
- * Tests of {@link FixedDecimalImpl#acquire(int, int)}.
- */
- @Test
- public void testNumericFactory() {
- FixedDecimal out = FixedDecimalImpl.acquire(0, 112);
- assertThat(out.scale()).isEqualTo(0);
- assertThat(out.unscaledValue()).isEqualTo(112);
-
- out = FixedDecimalImpl.acquire(3, 147_339);
- assertThat(out.scale()).isEqualTo(3);
- assertThat(out.unscaledValue()).isEqualTo(147_339);
- }
-
- /**
- * Tests of {@link FixedDecimalImpl#acquire(String)}.
- */
- @Test
- public void testStringFactory() {
- FixedDecimal out = FixedDecimalImpl.acquire("112");
- assertThat(out.scale()).isEqualTo(0);
- assertThat(out.unscaledValue()).isEqualTo(112);
-
- out = FixedDecimalImpl.acquire("147.339");
- assertThat(out.scale()).isEqualTo(3);
- assertThat(out.unscaledValue()).isEqualTo(147_339);
- }
-
- /**
- * Tests of {@link FixedDecimalImpl#whole()}.
- */
- @Test
- public void testWhole() {
- FixedDecimalImpl out = FixedDecimalImpl.acquire(0, 112);
- assertThat(out.whole()).isEqualTo(112);
-
- out = FixedDecimalImpl.acquire("147.339");
- assertThat(out.whole()).isEqualTo(147);
- }
-
- /**
- * Tests of {@link FixedDecimalImpl#fractional()}.
- */
- @Test
- public void testFractional() {
- FixedDecimalImpl out = FixedDecimalImpl.acquire(0, 112);
- assertThat(out.fractional()).isEqualTo(0);
-
- out = FixedDecimalImpl.acquire("147.339");
- assertThat(out.fractional()).isEqualTo(339);
- }
-
- /**
- * Tests of {@link FixedDecimalImpl#compareTo(FixedPoint)}.
- */
- @Test
- public void testCompareTo() {
- FixedDecimalImpl low = FixedDecimalImpl.acquire("112");
- FixedDecimalImpl high = FixedDecimalImpl.acquire("113");
- assertThat(high.compareTo(low)).isGreaterThan(0);
-
- low = FixedDecimalImpl.acquire("2147483.646");
- high = FixedDecimalImpl.acquire("2147483.647");
- assertThat(high.compareTo(low)).isGreaterThan(0);
-
- low = FixedDecimalImpl.acquire(".646");
- high = FixedDecimalImpl.acquire(".647");
- assertThat(high.compareTo(low)).isGreaterThan(0);
-
- low = FixedDecimalImpl.acquire("110.646");
- high = FixedDecimalImpl.acquire("110.646");
- assertThat(high.compareTo(low)).isEqualTo(0);
-
- low = FixedDecimalImpl.acquire("110.64");
- high = FixedDecimalImpl.acquire("110.641");
- assertThat(high.compareTo(low)).isGreaterThan(0);
- }
-
- /**
- * Tests of {@link FixedDecimalImpl#isEqualTo(FixedPoint)}.
- */
- @Test
- public void testIsEqualTo() {
- FixedDecimalImpl value1 = FixedDecimalImpl.acquire("112");
- FixedDecimalImpl value2 = FixedDecimalImpl.acquire("113");
- assertThat(value1.isEqualTo(value2)).isFalse();
-
- value1 = FixedDecimalImpl.acquire("2147483.646");
- value2 = FixedDecimalImpl.acquire("2147483.647");
- assertThat(value1.isEqualTo(value2)).isFalse();
-
- value1 = FixedDecimalImpl.acquire(".646");
- value2 = FixedDecimalImpl.acquire(".647");
- assertThat(value1.isEqualTo(value2)).isFalse();
-
- value1 = FixedDecimalImpl.acquire("110.646");
- value2 = FixedDecimalImpl.acquire("110.646");
- assertThat(value1.isEqualTo(value2)).isTrue();
-
- value1 = FixedDecimalImpl.acquire("110.64");
- value2 = FixedDecimalImpl.acquire("110.641");
- assertThat(value1.isEqualTo(value2)).isFalse();
- }
-
- /**
- * Tests of {@link FixedDecimalImpl#isNotEqualTo(FixedPoint)}.
- */
- @Test
- public void testIsNotEqualTo() {
- FixedDecimalImpl value1 = FixedDecimalImpl.acquire("112");
- FixedDecimalImpl value2 = FixedDecimalImpl.acquire("113");
- assertThat(value1.isNotEqualTo(value2)).isTrue();
-
- value1 = FixedDecimalImpl.acquire("2147483.646");
- value2 = FixedDecimalImpl.acquire("2147483.647");
- assertThat(value1.isNotEqualTo(value2)).isTrue();
-
- value1 = FixedDecimalImpl.acquire(".646");
- value2 = FixedDecimalImpl.acquire(".647");
- assertThat(value1.isNotEqualTo(value2)).isTrue();
-
- value1 = FixedDecimalImpl.acquire("110.646");
- value2 = FixedDecimalImpl.acquire("110.646");
- assertThat(value1.isNotEqualTo(value2)).isFalse();
-
- value1 = FixedDecimalImpl.acquire("110.64");
- value2 = FixedDecimalImpl.acquire("110.641");
- assertThat(value1.isNotEqualTo(value2)).isTrue();
- }
-
- /**
- * Tests of {@link FixedDecimalImpl#isGreaterThan(FixedPoint)}.
- */
- @Test
- public void testIsGreaterThan() {
- FixedDecimalImpl value1 = FixedDecimalImpl.acquire("113");
- FixedDecimalImpl value2 = FixedDecimalImpl.acquire("112");
- assertThat(value1.isGreaterThan(value2)).isTrue();
-
- value1 = FixedDecimalImpl.acquire("2147483.646");
- value2 = FixedDecimalImpl.acquire("2147483.647");
- assertThat(value1.isGreaterThan(value2)).isFalse();
-
- value1 = FixedDecimalImpl.acquire(".647");
- value2 = FixedDecimalImpl.acquire(".646");
- assertThat(value1.isGreaterThan(value2)).isTrue();
-
- value1 = FixedDecimalImpl.acquire("110.646");
- value2 = FixedDecimalImpl.acquire("110.646");
- assertThat(value1.isGreaterThan(value2)).isFalse();
-
- value1 = FixedDecimalImpl.acquire("110.64");
- value2 = FixedDecimalImpl.acquire("110.641");
- assertThat(value1.isGreaterThan(value2)).isFalse();
- }
-
- /**
- * Tests of {@link FixedDecimalImpl#isNotGreaterThan(FixedPoint)}.
- */
- @Test
- public void testIsNotGreaterThan() {
- FixedDecimalImpl value1 = FixedDecimalImpl.acquire("113");
- FixedDecimalImpl value2 = FixedDecimalImpl.acquire("112");
- assertThat(value1.isNotGreaterThan(value2)).isFalse();
-
- value1 = FixedDecimalImpl.acquire("2147483.646");
- value2 = FixedDecimalImpl.acquire("2147483.647");
- assertThat(value1.isNotGreaterThan(value2)).isTrue();
-
- value1 = FixedDecimalImpl.acquire(".647");
- value2 = FixedDecimalImpl.acquire(".646");
- assertThat(value1.isNotGreaterThan(value2)).isFalse();
-
- value1 = FixedDecimalImpl.acquire("110.646");
- value2 = FixedDecimalImpl.acquire("110.646");
- assertThat(value1.isNotGreaterThan(value2)).isTrue();
-
- value1 = FixedDecimalImpl.acquire("110.64");
- value2 = FixedDecimalImpl.acquire("110.641");
- assertThat(value1.isNotGreaterThan(value2)).isTrue();
- }
-
- /**
- * Tests of {@link FixedDecimalImpl#isLessThan(FixedPoint)}.
- */
- @Test
- public void testIsLessThan() {
- FixedDecimalImpl value1 = FixedDecimalImpl.acquire("113");
- FixedDecimalImpl value2 = FixedDecimalImpl.acquire("112");
- assertThat(value1.isLessThan(value2)).isFalse();
-
- value1 = FixedDecimalImpl.acquire("2147483.646");
- value2 = FixedDecimalImpl.acquire("2147483.647");
- assertThat(value1.isLessThan(value2)).isTrue();
-
- value1 = FixedDecimalImpl.acquire(".647");
- value2 = FixedDecimalImpl.acquire(".646");
- assertThat(value1.isLessThan(value2)).isFalse();
-
- value1 = FixedDecimalImpl.acquire("110.646");
- value2 = FixedDecimalImpl.acquire("110.646");
- assertThat(value1.isLessThan(value2)).isFalse();
-
- value1 = FixedDecimalImpl.acquire("110.64");
- value2 = FixedDecimalImpl.acquire("110.641");
- assertThat(value1.isLessThan(value2)).isTrue();
- }
-
- /**
- * Tests of {@link FixedDecimalImpl#isNotLessThan(FixedPoint)}.
- */
- @Test
- public void testIsNotLessThan() {
- FixedDecimalImpl value1 = FixedDecimalImpl.acquire("113");
- FixedDecimalImpl value2 = FixedDecimalImpl.acquire("112");
- assertThat(value1.isNotLessThan(value2)).isTrue();
-
- value1 = FixedDecimalImpl.acquire("2147483.646");
- value2 = FixedDecimalImpl.acquire("2147483.647");
- assertThat(value1.isNotLessThan(value2)).isFalse();
-
- value1 = FixedDecimalImpl.acquire(".647");
- value2 = FixedDecimalImpl.acquire(".646");
- assertThat(value1.isNotLessThan(value2)).isTrue();
-
- value1 = FixedDecimalImpl.acquire("110.646");
- value2 = FixedDecimalImpl.acquire("110.646");
- assertThat(value1.isNotLessThan(value2)).isTrue();
-
- value1 = FixedDecimalImpl.acquire("110.64");
- value2 = FixedDecimalImpl.acquire("110.641");
- assertThat(value1.isNotLessThan(value2)).isFalse();
- }
-
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-26 02:04:52
|
Revision: 3019
http://sourceforge.net/p/axsl/code/3019
Author: victormote
Date: 2026-04-26 02:04:49 +0000 (Sun, 26 Apr 2026)
Log Message:
-----------
Move FixedDecimal implementations to aXSL.
Modified Paths:
--------------
trunk/axsl/axsl-primitive/build.gradle
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/package-info.java
Added Paths:
-----------
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimalImpl.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_00.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_01.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_02.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_03.java
trunk/axsl/axsl-primitive/src/test/java/
trunk/axsl/axsl-primitive/src/test/java/org/
trunk/axsl/axsl-primitive/src/test/java/org/axsl/
trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/
trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/
trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimalImplTests.java
Modified: trunk/axsl/axsl-primitive/build.gradle
===================================================================
--- trunk/axsl/axsl-primitive/build.gradle 2026-04-25 23:18:44 UTC (rev 3018)
+++ trunk/axsl/axsl-primitive/build.gradle 2026-04-26 02:04:49 UTC (rev 3019)
@@ -1,5 +1,6 @@
plugins {
id 'axsl.java-library-conventions'
+ id 'axsl.test-conventions'
}
description = "axsl-primitive"
Added: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimalImpl.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimalImpl.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimalImpl.java 2026-04-26 02:04:49 UTC (rev 3019)
@@ -0,0 +1,230 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate $
+ * $LastChangedBy$
+ */
+
+package org.axsl.primitive.fixed;
+
+import java.math.BigDecimal;
+
+/**
+ * Subclasses are 32-bit implementations of fixed decimal numeric values.
+ * The unscaledValue is stored in this superclass.
+ * The scale is supplied by subclasses.
+ */
+public abstract class FixedDecimalImpl implements FixedDecimal {
+
+ /** Constant for the scale of 0. */
+ protected static final int SCALE_00 = 0;
+
+ /** Constant for the scale of 1. */
+ protected static final int SCALE_01 = 1;
+
+ /** Constant for the scale of 2. */
+ protected static final int SCALE_02 = 2;
+
+ /** Constant for the scale of 3. */
+ protected static final int SCALE_03 = 3;
+
+ /**
+ * Enumeration of configurations for fixed-point classes.
+ */
+ enum Config {
+
+ /** Scale of 0. */
+ CONFIG_00(0, 1),
+
+ /** Scale of 1. */
+ CONFIG_01(1, 10),
+
+ /** Scale of 2. */
+ CONFIG_02(2, 100),
+
+ /** Scale of 3. */
+ CONFIG_03(3, 1000);
+
+ /** The scale for this configuration. */
+ private int scale;
+
+ /** The conversion factor. */
+ private int conversionFactor;
+
+ /**
+ * Constructor.
+ * @param scale The scale for this configuration.
+ * @param conversionFactor The conversion factor for this configuration.
+ */
+ Config(final int scale, final int conversionFactor) {
+ this.scale = scale;
+ this.conversionFactor = conversionFactor;
+ }
+
+ /**
+ * Returns the scale for this configuration.
+ * @return The scale for this configuration.
+ */
+ public int getScale() {
+ return this.scale;
+ }
+
+ /**
+ * Returns the conversionFactor for this configuration.
+ * @return The conversionFactor for this configuration.
+ */
+ public int getConversionFactor() {
+ return this.conversionFactor;
+ }
+
+ }
+
+ /** The unscaledValue of this fixed-point value. */
+ private int unscaledValue;
+
+ /**
+ * Constructor.
+ * @param unscaledValue The unscaledValue of this fixed-point value.
+ */
+ protected FixedDecimalImpl(final int unscaledValue) {
+ this.unscaledValue = unscaledValue;
+ }
+
+ /**
+ * Factory method.
+ * @param scale The scale of the fixed-point to be acquired.
+ * @param unscaledValue The unscaledValue of the fixed-point to be acquired.
+ * @return An instance matching {@code scale} and {@code unscaledValue}.
+ * @throws IllegalArgumentException For an unknown scale.
+ */
+ public static FixedDecimalImpl acquire(final int scale, final int unscaledValue) {
+ switch (scale) {
+ case SCALE_00: return new FixedDecimal_00(unscaledValue);
+ case SCALE_01: return new FixedDecimal_01(unscaledValue);
+ case SCALE_02: return new FixedDecimal_02(unscaledValue);
+ case SCALE_03: return new FixedDecimal_03(unscaledValue);
+ }
+ throw new IllegalArgumentException("Implementation not found for scale: " + scale);
+ }
+
+ /**
+ * Factory method.
+ * @param bd The BigDecimal to be converted to an instance of {@link FixedDecimalImpl}.
+ * @return An instance whose values match {@code bd}.
+ * @see org.axsl.primitive.fixed.FixedBigDecimal#FixedBigDecimal(BigDecimal)
+ */
+ public static FixedDecimalImpl acquire(final BigDecimal bd) {
+ return acquire(bd.scale(), bd.unscaledValue().intValueExact());
+ }
+
+ /**
+ * Factory method.
+ * @param numeric The numeric string to be converted to a fixed-point.
+ * @return An instance matching {@code numeric}.
+ * @throws NumberFormatException For invalid values of {@code numeric}.
+ */
+ public static FixedDecimalImpl acquire(final CharSequence numeric) {
+ final String numericString = numeric.toString();
+ final int decimalIndex = numericString.indexOf('.');
+ if (decimalIndex < 0) {
+ return acquire(0, Integer.parseInt(numericString));
+ }
+ final int scale = numeric.length() - decimalIndex - 1;
+ final StringBuilder builder = new StringBuilder(numericString);
+ builder.deleteCharAt(decimalIndex);
+ final int unscaledValue = Integer.parseInt(builder.toString());
+ return acquire(scale, unscaledValue);
+ }
+
+ /**
+ * Returns the configuration.
+ * @return The configuration.
+ */
+ public abstract Config getConfig();
+
+ @Override
+ public int unscaledValue() {
+ return this.unscaledValue;
+ }
+
+ @Override
+ public int scale() {
+ return getConfig().getScale();
+ }
+
+ /**
+ * Returns the whole number portion of this fixed-point.
+ * @return The whole number portion of this.
+ * For example, for 123.456, returns 123.
+ */
+ public int whole() {
+ return this.unscaledValue / getConfig().conversionFactor;
+ }
+
+ /**
+ * Returns the fractional portion of this fixed-point.
+ * @return The fractional portion of this.
+ * For example, for 123.456, returns 456.
+ */
+ public int fractional() {
+ return this.unscaledValue % getConfig().conversionFactor;
+ }
+
+ @Override
+ public int compareTo(final FixedDecimal other) {
+ if (this.scale() == other.scale()) {
+ return this.unscaledValue - other.unscaledValue();
+ }
+ final FixedDecimalImpl other4a = other instanceof FixedDecimalImpl ? (FixedDecimalImpl) other :
+ FixedDecimalImpl.acquire(other.scale(), other.unscaledValue());
+ final int whole1 = this.whole();
+ final int whole2 = other4a.whole();
+ if (whole1 == whole2) {
+ final int fractional1 = this.fractional();
+ final int fractional2 = other4a.fractional();
+ return fractional1 - fractional2;
+ }
+ return whole1 - whole2;
+ }
+
+ @Override
+ public FixedDecimal add(final FixedDecimal addend) {
+ final BigDecimal result = toBigDecimal().add(addend.toBigDecimal());
+ return acquire(result);
+ }
+
+ @Override
+ public FixedDecimal subtract(final FixedDecimal subtrahend) {
+ final BigDecimal result = toBigDecimal().subtract(subtrahend.toBigDecimal());
+ return acquire(result);
+ }
+
+ @Override
+ public FixedDecimal multiply(final FixedDecimal multiplier) {
+ final BigDecimal result = toBigDecimal().multiply(multiplier.toBigDecimal());
+ return acquire(result);
+ }
+
+ @Override
+ public FixedDecimal divide(final FixedDecimal divisor) {
+ final BigDecimal result = toBigDecimal().divide(divisor.toBigDecimal());
+ return acquire(result);
+ }
+
+}
Property changes on: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimalImpl.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Added: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_00.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_00.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_00.java 2026-04-26 02:04:49 UTC (rev 3019)
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate $
+ * $LastChangedBy$
+ */
+
+package org.axsl.primitive.fixed;
+
+/**
+ * A fixed-point value with a scale of 0.
+ * This is the functional equivalent of {@link java.lang.Integer}.
+ */
+public class FixedDecimal_00 extends FixedDecimalImpl {
+
+ /**
+ * Constructor.
+ * @param unscaledValue The unscaledValue of this fixed-point value.
+ */
+ protected FixedDecimal_00(final int unscaledValue) {
+ super(unscaledValue);
+ }
+
+ @Override
+ public Config getConfig() {
+ return Config.CONFIG_00;
+ }
+
+}
Property changes on: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_00.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Added: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_01.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_01.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_01.java 2026-04-26 02:04:49 UTC (rev 3019)
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate $
+ * $LastChangedBy$
+ */
+
+package org.axsl.primitive.fixed;
+
+/**
+ * A fixed-point value with a scale of 1.
+ */
+public class FixedDecimal_01 extends FixedDecimalImpl {
+
+ /**
+ * Constructor.
+ * @param unscaledValue The unscaledValue of this fixed-point value.
+ */
+ protected FixedDecimal_01(final int unscaledValue) {
+ super(unscaledValue);
+ }
+
+ @Override
+ public Config getConfig() {
+ return Config.CONFIG_01;
+ }
+
+}
Property changes on: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_01.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Added: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_02.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_02.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_02.java 2026-04-26 02:04:49 UTC (rev 3019)
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate $
+ * $LastChangedBy$
+ */
+
+package org.axsl.primitive.fixed;
+
+/**
+ * A fixed-point value with a scale of 2.
+ */
+public class FixedDecimal_02 extends FixedDecimalImpl {
+
+ /**
+ * Constructor.
+ * @param unscaledValue The unscaledValue of this fixed-point value.
+ */
+ protected FixedDecimal_02(final int unscaledValue) {
+ super(unscaledValue);
+ }
+
+ @Override
+ public Config getConfig() {
+ return Config.CONFIG_02;
+ }
+
+}
Property changes on: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_02.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Added: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_03.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_03.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_03.java 2026-04-26 02:04:49 UTC (rev 3019)
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate $
+ * $LastChangedBy$
+ */
+
+package org.axsl.primitive.fixed;
+
+/**
+ * A fixed-point value with a scale of 3.
+ */
+public class FixedDecimal_03 extends FixedDecimalImpl {
+
+ /**
+ * Constructor.
+ * @param unscaledValue The unscaledValue of this fixed-point value.
+ */
+ protected FixedDecimal_03(final int unscaledValue) {
+ super(unscaledValue);
+ }
+
+ @Override
+ public Config getConfig() {
+ return Config.CONFIG_03;
+ }
+
+}
Property changes on: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal_03.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/package-info.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/package-info.java 2026-04-25 23:18:44 UTC (rev 3018)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/package-info.java 2026-04-26 02:04:49 UTC (rev 3019)
@@ -22,6 +22,12 @@
*/
/**
- * Support for fixed-point numerics.
+ * Support for fixed-point decimal numerics.
+ * There is no native support for fixed-point decimal values in Java, except for {@link java.math.BigDecimal}, which is
+ * much heavier than needed by aXSL and its implementations.
+ * Nor do we know of a standard interface that could be used to express such values.
+ * The {@link FixedDecimal} interface included in this package is intended to provide that interface, and should be used
+ * for most parameters and return values where such numbers are needed.
+ * Two lightweight implementations are also included, so that constants can be used within aXSL.
*/
package org.axsl.primitive.fixed;
Added: trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimalImplTests.java
===================================================================
--- trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimalImplTests.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimalImplTests.java 2026-04-26 02:04:49 UTC (rev 3019)
@@ -0,0 +1,269 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate $
+ * $LastChangedBy$
+ */
+
+
+package org.axsl.primitive.fixed;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Tests of {@link FixedDecimalImpl}.
+ */
+public class FixedDecimalImplTests {
+
+ /**
+ * Tests of {@link FixedDecimalImpl#acquire(int, int)}.
+ */
+ @Test
+ public void testNumericFactory() {
+ FixedDecimal out = FixedDecimalImpl.acquire(0, 112);
+ assertThat(out.scale()).isEqualTo(0);
+ assertThat(out.unscaledValue()).isEqualTo(112);
+
+ out = FixedDecimalImpl.acquire(3, 147_339);
+ assertThat(out.scale()).isEqualTo(3);
+ assertThat(out.unscaledValue()).isEqualTo(147_339);
+ }
+
+ /**
+ * Tests of {@link FixedDecimalImpl#acquire(String)}.
+ */
+ @Test
+ public void testStringFactory() {
+ FixedDecimal out = FixedDecimalImpl.acquire("112");
+ assertThat(out.scale()).isEqualTo(0);
+ assertThat(out.unscaledValue()).isEqualTo(112);
+
+ out = FixedDecimalImpl.acquire("147.339");
+ assertThat(out.scale()).isEqualTo(3);
+ assertThat(out.unscaledValue()).isEqualTo(147_339);
+ }
+
+ /**
+ * Tests of {@link FixedDecimalImpl#whole()}.
+ */
+ @Test
+ public void testWhole() {
+ FixedDecimalImpl out = FixedDecimalImpl.acquire(0, 112);
+ assertThat(out.whole()).isEqualTo(112);
+
+ out = FixedDecimalImpl.acquire("147.339");
+ assertThat(out.whole()).isEqualTo(147);
+ }
+
+ /**
+ * Tests of {@link FixedDecimalImpl#fractional()}.
+ */
+ @Test
+ public void testFractional() {
+ FixedDecimalImpl out = FixedDecimalImpl.acquire(0, 112);
+ assertThat(out.fractional()).isEqualTo(0);
+
+ out = FixedDecimalImpl.acquire("147.339");
+ assertThat(out.fractional()).isEqualTo(339);
+ }
+
+ /**
+ * Tests of {@link FixedDecimalImpl#compareTo(FixedPoint)}.
+ */
+ @Test
+ public void testCompareTo() {
+ FixedDecimalImpl low = FixedDecimalImpl.acquire("112");
+ FixedDecimalImpl high = FixedDecimalImpl.acquire("113");
+ assertThat(high.compareTo(low)).isGreaterThan(0);
+
+ low = FixedDecimalImpl.acquire("2147483.646");
+ high = FixedDecimalImpl.acquire("2147483.647");
+ assertThat(high.compareTo(low)).isGreaterThan(0);
+
+ low = FixedDecimalImpl.acquire(".646");
+ high = FixedDecimalImpl.acquire(".647");
+ assertThat(high.compareTo(low)).isGreaterThan(0);
+
+ low = FixedDecimalImpl.acquire("110.646");
+ high = FixedDecimalImpl.acquire("110.646");
+ assertThat(high.compareTo(low)).isEqualTo(0);
+
+ low = FixedDecimalImpl.acquire("110.64");
+ high = FixedDecimalImpl.acquire("110.641");
+ assertThat(high.compareTo(low)).isGreaterThan(0);
+ }
+
+ /**
+ * Tests of {@link FixedDecimalImpl#isEqualTo(FixedPoint)}.
+ */
+ @Test
+ public void testIsEqualTo() {
+ FixedDecimalImpl value1 = FixedDecimalImpl.acquire("112");
+ FixedDecimalImpl value2 = FixedDecimalImpl.acquire("113");
+ assertThat(value1.isEqualTo(value2)).isFalse();
+
+ value1 = FixedDecimalImpl.acquire("2147483.646");
+ value2 = FixedDecimalImpl.acquire("2147483.647");
+ assertThat(value1.isEqualTo(value2)).isFalse();
+
+ value1 = FixedDecimalImpl.acquire(".646");
+ value2 = FixedDecimalImpl.acquire(".647");
+ assertThat(value1.isEqualTo(value2)).isFalse();
+
+ value1 = FixedDecimalImpl.acquire("110.646");
+ value2 = FixedDecimalImpl.acquire("110.646");
+ assertThat(value1.isEqualTo(value2)).isTrue();
+
+ value1 = FixedDecimalImpl.acquire("110.64");
+ value2 = FixedDecimalImpl.acquire("110.641");
+ assertThat(value1.isEqualTo(value2)).isFalse();
+ }
+
+ /**
+ * Tests of {@link FixedDecimalImpl#isNotEqualTo(FixedPoint)}.
+ */
+ @Test
+ public void testIsNotEqualTo() {
+ FixedDecimalImpl value1 = FixedDecimalImpl.acquire("112");
+ FixedDecimalImpl value2 = FixedDecimalImpl.acquire("113");
+ assertThat(value1.isNotEqualTo(value2)).isTrue();
+
+ value1 = FixedDecimalImpl.acquire("2147483.646");
+ value2 = FixedDecimalImpl.acquire("2147483.647");
+ assertThat(value1.isNotEqualTo(value2)).isTrue();
+
+ value1 = FixedDecimalImpl.acquire(".646");
+ value2 = FixedDecimalImpl.acquire(".647");
+ assertThat(value1.isNotEqualTo(value2)).isTrue();
+
+ value1 = FixedDecimalImpl.acquire("110.646");
+ value2 = FixedDecimalImpl.acquire("110.646");
+ assertThat(value1.isNotEqualTo(value2)).isFalse();
+
+ value1 = FixedDecimalImpl.acquire("110.64");
+ value2 = FixedDecimalImpl.acquire("110.641");
+ assertThat(value1.isNotEqualTo(value2)).isTrue();
+ }
+
+ /**
+ * Tests of {@link FixedDecimalImpl#isGreaterThan(FixedPoint)}.
+ */
+ @Test
+ public void testIsGreaterThan() {
+ FixedDecimalImpl value1 = FixedDecimalImpl.acquire("113");
+ FixedDecimalImpl value2 = FixedDecimalImpl.acquire("112");
+ assertThat(value1.isGreaterThan(value2)).isTrue();
+
+ value1 = FixedDecimalImpl.acquire("2147483.646");
+ value2 = FixedDecimalImpl.acquire("2147483.647");
+ assertThat(value1.isGreaterThan(value2)).isFalse();
+
+ value1 = FixedDecimalImpl.acquire(".647");
+ value2 = FixedDecimalImpl.acquire(".646");
+ assertThat(value1.isGreaterThan(value2)).isTrue();
+
+ value1 = FixedDecimalImpl.acquire("110.646");
+ value2 = FixedDecimalImpl.acquire("110.646");
+ assertThat(value1.isGreaterThan(value2)).isFalse();
+
+ value1 = FixedDecimalImpl.acquire("110.64");
+ value2 = FixedDecimalImpl.acquire("110.641");
+ assertThat(value1.isGreaterThan(value2)).isFalse();
+ }
+
+ /**
+ * Tests of {@link FixedDecimalImpl#isNotGreaterThan(FixedPoint)}.
+ */
+ @Test
+ public void testIsNotGreaterThan() {
+ FixedDecimalImpl value1 = FixedDecimalImpl.acquire("113");
+ FixedDecimalImpl value2 = FixedDecimalImpl.acquire("112");
+ assertThat(value1.isNotGreaterThan(value2)).isFalse();
+
+ value1 = FixedDecimalImpl.acquire("2147483.646");
+ value2 = FixedDecimalImpl.acquire("2147483.647");
+ assertThat(value1.isNotGreaterThan(value2)).isTrue();
+
+ value1 = FixedDecimalImpl.acquire(".647");
+ value2 = FixedDecimalImpl.acquire(".646");
+ assertThat(value1.isNotGreaterThan(value2)).isFalse();
+
+ value1 = FixedDecimalImpl.acquire("110.646");
+ value2 = FixedDecimalImpl.acquire("110.646");
+ assertThat(value1.isNotGreaterThan(value2)).isTrue();
+
+ value1 = FixedDecimalImpl.acquire("110.64");
+ value2 = FixedDecimalImpl.acquire("110.641");
+ assertThat(value1.isNotGreaterThan(value2)).isTrue();
+ }
+
+ /**
+ * Tests of {@link FixedDecimalImpl#isLessThan(FixedPoint)}.
+ */
+ @Test
+ public void testIsLessThan() {
+ FixedDecimalImpl value1 = FixedDecimalImpl.acquire("113");
+ FixedDecimalImpl value2 = FixedDecimalImpl.acquire("112");
+ assertThat(value1.isLessThan(value2)).isFalse();
+
+ value1 = FixedDecimalImpl.acquire("2147483.646");
+ value2 = FixedDecimalImpl.acquire("2147483.647");
+ assertThat(value1.isLessThan(value2)).isTrue();
+
+ value1 = FixedDecimalImpl.acquire(".647");
+ value2 = FixedDecimalImpl.acquire(".646");
+ assertThat(value1.isLessThan(value2)).isFalse();
+
+ value1 = FixedDecimalImpl.acquire("110.646");
+ value2 = FixedDecimalImpl.acquire("110.646");
+ assertThat(value1.isLessThan(value2)).isFalse();
+
+ value1 = FixedDecimalImpl.acquire("110.64");
+ value2 = FixedDecimalImpl.acquire("110.641");
+ assertThat(value1.isLessThan(value2)).isTrue();
+ }
+
+ /**
+ * Tests of {@link FixedDecimalImpl#isNotLessThan(FixedPoint)}.
+ */
+ @Test
+ public void testIsNotLessThan() {
+ FixedDecimalImpl value1 = FixedDecimalImpl.acquire("113");
+ FixedDecimalImpl value2 = FixedDecimalImpl.acquire("112");
+ assertThat(value1.isNotLessThan(value2)).isTrue();
+
+ value1 = FixedDecimalImpl.acquire("2147483.646");
+ value2 = FixedDecimalImpl.acquire("2147483.647");
+ assertThat(value1.isNotLessThan(value2)).isFalse();
+
+ value1 = FixedDecimalImpl.acquire(".647");
+ value2 = FixedDecimalImpl.acquire(".646");
+ assertThat(value1.isNotLessThan(value2)).isTrue();
+
+ value1 = FixedDecimalImpl.acquire("110.646");
+ value2 = FixedDecimalImpl.acquire("110.646");
+ assertThat(value1.isNotLessThan(value2)).isTrue();
+
+ value1 = FixedDecimalImpl.acquire("110.64");
+ value2 = FixedDecimalImpl.acquire("110.641");
+ assertThat(value1.isNotLessThan(value2)).isFalse();
+ }
+
+}
Property changes on: trunk/axsl/axsl-primitive/src/test/java/org/axsl/primitive/fixed/FixedDecimalImplTests.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-25 23:18:47
|
Revision: 3018
http://sourceforge.net/p/axsl/code/3018
Author: victormote
Date: 2026-04-25 23:18:44 +0000 (Sat, 25 Apr 2026)
Log Message:
-----------
Move generated Unicode classes to FOray. They are just not needed in aXSL.
Modified Paths:
--------------
trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-suppressions.xml
trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java
trunk/axsl/axsl-value/src/main/java/org/axsl/value/group/TextModifiers.java
Removed Paths:
-------------
trunk/axsl/axsl-constants/src/main/java/org/axsl/unicode/
trunk/axsl/axsl-constants/src/test/java/org/axsl/unicode/
Modified: trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-suppressions.xml
===================================================================
--- trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-suppressions.xml 2026-04-25 21:01:14 UTC (rev 3017)
+++ trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-suppressions.xml 2026-04-25 23:18:44 UTC (rev 3018)
@@ -25,10 +25,4 @@
<suppress checks="TrailingCommentCheck"
files="src.main.java.org.axsl.fotree.fo*"/>
- <!-- Permanently suppress type name checking and Javadoc on variables for Unicode block classes. -->
- <suppress checks="TypeName"
- files="src.main.java.org.axsl.unicode.block*"/>
- <suppress checks="JavadocVariable"
- files="src.main.java.org.axsl.unicode.block*"/>
-
</suppressions>
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java 2026-04-25 21:01:14 UTC (rev 3017)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java 2026-04-25 23:18:44 UTC (rev 3018)
@@ -29,7 +29,6 @@
import org.axsl.orthography.Orthography;
import org.axsl.ps.BoundingBox;
import org.axsl.ps.Encoding;
-import org.axsl.unicode.block.U0000_Basic_Latin;
import org.axsl.value.FontStretch;
import java.math.BigDecimal;
@@ -301,7 +300,7 @@
glyphSpaceSize += kerning;
}
/* Count word spaces for downstream processing. */
- if (codePoint == U0000_Basic_Latin.SPACE) {
+ if (codePoint == ' ') {
spaceCount ++;
}
}
Modified: trunk/axsl/axsl-value/src/main/java/org/axsl/value/group/TextModifiers.java
===================================================================
--- trunk/axsl/axsl-value/src/main/java/org/axsl/value/group/TextModifiers.java 2026-04-25 21:01:14 UTC (rev 3017)
+++ trunk/axsl/axsl-value/src/main/java/org/axsl/value/group/TextModifiers.java 2026-04-25 23:18:44 UTC (rev 3018)
@@ -23,7 +23,6 @@
package org.axsl.value.group;
-import org.axsl.unicode.block.U2000_General_Punctuation;
import org.axsl.value.LinefeedTreatment;
import org.axsl.value.TextTransform;
import org.axsl.value.WhiteSpaceTreatment;
@@ -89,7 +88,7 @@
@Override
public CharSequence traitHyphenationCharacter() {
- return Character.toString(U2000_General_Punctuation.HYPHEN);
+ return Character.toString('-');
}
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-25 21:01:16
|
Revision: 3017
http://sourceforge.net/p/axsl/code/3017
Author: victormote
Date: 2026-04-25 21:01:14 +0000 (Sat, 25 Apr 2026)
Log Message:
-----------
Convert some usages of Float to FixedDecimal.
Modified Paths:
--------------
trunk/axsl/axsl-speech/build.gradle
trunk/axsl/axsl-speech/src/main/java/org/axsl/speech/Voice.java
Modified: trunk/axsl/axsl-speech/build.gradle
===================================================================
--- trunk/axsl/axsl-speech/build.gradle 2026-04-25 15:05:31 UTC (rev 3016)
+++ trunk/axsl/axsl-speech/build.gradle 2026-04-25 21:01:14 UTC (rev 3017)
@@ -2,6 +2,10 @@
id 'axsl.java-library-conventions'
}
+dependencies {
+ api project(":axsl-primitive")
+}
+
description = "axsl-speech"
/* Last line of script. */
Modified: trunk/axsl/axsl-speech/src/main/java/org/axsl/speech/Voice.java
===================================================================
--- trunk/axsl/axsl-speech/src/main/java/org/axsl/speech/Voice.java 2026-04-25 15:05:31 UTC (rev 3016)
+++ trunk/axsl/axsl-speech/src/main/java/org/axsl/speech/Voice.java 2026-04-25 21:01:14 UTC (rev 3017)
@@ -23,6 +23,8 @@
package org.axsl.speech;
+import org.axsl.primitive.fixed.FixedDecimal;
+
/**
* A voice "font" for text-to-speech applications.
* Note that the Java Speech API defines a "Voice" class.
@@ -40,30 +42,30 @@
* The normal extra-low frequency for this voice family.
* @return The normal extra-low frequency, in hertz, for this voice family.
*/
- Float pitchExtraLow();
+ FixedDecimal pitchExtraLow();
/**
* The normal low frequency for this voice family.
* @return The normal low frequency, in hertz, for this voice family.
*/
- Float pitchLow();
+ FixedDecimal pitchLow();
/**
* The normal medium frequency for this voice family.
* @return The normal medium frequency, in hertz, for this voice family.
*/
- Float pitchMedium();
+ FixedDecimal pitchMedium();
/**
* The normal high frequency for this voice family.
* @return The normal high frequency, in hertz, for this voice family.
*/
- Float pitchHigh();
+ FixedDecimal pitchHigh();
/**
* The normal extra-high frequency for this voice family.
* @return The normal extra-high frequency, in hertz, for this voice family.
*/
- Float pitchExtraHigh();
+ FixedDecimal pitchExtraHigh();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-25 15:05:34
|
Revision: 3016
http://sourceforge.net/p/axsl/code/3016
Author: victormote
Date: 2026-04-25 15:05:31 +0000 (Sat, 25 Apr 2026)
Log Message:
-----------
Rename "Float" value class to "FloatDirection" to avoid confusion with java.lang.Float.
Modified Paths:
--------------
trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/fo/prop/FloatPa.java
Added Paths:
-----------
trunk/axsl/axsl-value/src/main/java/org/axsl/value/FloatDirection.java
Removed Paths:
-------------
trunk/axsl/axsl-value/src/main/java/org/axsl/value/Float.java
Modified: trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/fo/prop/FloatPa.java
===================================================================
--- trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/fo/prop/FloatPa.java 2026-04-25 14:25:58 UTC (rev 3015)
+++ trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/fo/prop/FloatPa.java 2026-04-25 15:05:31 UTC (rev 3016)
@@ -38,6 +38,6 @@
* @see "XSL-FO Recommendation 1.0, Section 7.18.2"
* @see "XSL-FO Recommendation 1.1, Section 7.19.2"
*/
- org.axsl.value.Float traitFloat(FoContext context);
+ org.axsl.value.FloatDirection traitFloat(FoContext context);
}
Deleted: trunk/axsl/axsl-value/src/main/java/org/axsl/value/Float.java
===================================================================
--- trunk/axsl/axsl-value/src/main/java/org/axsl/value/Float.java 2026-04-25 14:25:58 UTC (rev 3015)
+++ trunk/axsl/axsl-value/src/main/java/org/axsl/value/Float.java 2026-04-25 15:05:31 UTC (rev 3016)
@@ -1,49 +0,0 @@
-/*
- * Copyright 2007 The aXSL Project.
- * http://www.axsl.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.axsl.value;
-
-/**
- * Enumeration of possible float values.
- */
-public enum Float {
-
- /** Specifies a before float. */
- BEFORE,
-
- /** Specifies a side float that is floated toward the start-edge. */
- START,
-
- /** Specifies a side float that is floated toward the end-edge. */
- END,
-
- /** Specifies a side float that is floated toward the inside-edge. */
- INSIDE,
-
- /** Specifies a side float that is floated toward the outside-edge. */
- OUTSIDE,
-
- /** Specifies that there is no float. */
- NONE;
-
-}
Copied: trunk/axsl/axsl-value/src/main/java/org/axsl/value/FloatDirection.java (from rev 2999, trunk/axsl/axsl-value/src/main/java/org/axsl/value/Float.java)
===================================================================
--- trunk/axsl/axsl-value/src/main/java/org/axsl/value/FloatDirection.java (rev 0)
+++ trunk/axsl/axsl-value/src/main/java/org/axsl/value/FloatDirection.java 2026-04-25 15:05:31 UTC (rev 3016)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2007 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.axsl.value;
+
+/**
+ * Enumeration of possible "float" values.
+ * @see "XSL Recommendation 1.1, Section 7.19.2."
+ */
+public enum FloatDirection {
+
+ /** Specifies a before float. */
+ BEFORE,
+
+ /** Specifies a side float that is floated toward the start-edge. */
+ START,
+
+ /** Specifies a side float that is floated toward the end-edge. */
+ END,
+
+ /** Specifies a side float that is floated toward the inside-edge. */
+ INSIDE,
+
+ /** Specifies a side float that is floated toward the outside-edge. */
+ OUTSIDE,
+
+ /** Specifies that there is no float. */
+ NONE;
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-25 14:25:59
|
Revision: 3015
http://sourceforge.net/p/axsl/code/3015
Author: victormote
Date: 2026-04-25 14:25:58 +0000 (Sat, 25 Apr 2026)
Log Message:
-----------
Fix prohibiion on use of java.lang.Double.
Modified Paths:
--------------
trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml
Modified: trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml
===================================================================
--- trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml 2026-04-24 18:50:28 UTC (rev 3014)
+++ trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml 2026-04-25 14:25:58 UTC (rev 3015)
@@ -244,9 +244,18 @@
</module>
<module name="IllegalType"/>
+ <!-- Classes suggested in the checkstyle doc. -->
<module name="IllegalType">
- <property name="illegalClassNames" value="java.lang.Double"/>
+ <property name="illegalClassNames" value="GregorianCalendar, Hashtable, ArrayList, LinkedList, Vector" />
</module>
+ <!-- Classes that we wish to disallow in favor of using FixedDecimal. We would like to include java.lang.Double and
+ java.lang.Float here, but the check seems to ignore them. See the RegexpSinglelineJava check which is used as a
+ workaround. -->
+<!--
+ <module name="IllegalType">
+ <property name="illegalClassNames" value="java.math.BigDecimal" />
+ </module>
+-->
<!-- Check for complexity. -->
<module name="CyclomaticComplexity">
@@ -322,9 +331,10 @@
<property name="message" value="Use @throws instead of @exception in Javadoc comments."/>
</module>
+ <!-- Haven't figured out how to push the following into the IllegalType check.-->
<module name="RegexpSinglelineJava">
<property name="ignoreComments" value="true"/>
- <property name="format" value="\s(double|float)\s"/>
+ <property name="format" value="\s([Dd]ouble|float)\s"/>
<property name="message" value="Use FixedDecimal for real (non-integer) numbers."/>
</module>
<!-- Allow float and double where explicitly needed. -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-24 18:50:31
|
Revision: 3014
http://sourceforge.net/p/axsl/code/3014
Author: victormote
Date: 2026-04-24 18:50:28 +0000 (Fri, 24 Apr 2026)
Log Message:
-----------
Prohibit use of primitive float and double, except in the primitive-specific classes.
Modified Paths:
--------------
trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml
trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/MeasurementConstants.java
trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/TypographicConstants.java
trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java
trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/FoContext.java
trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpFitnessClass.java
trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpUserAgent.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractDoubleSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractFloatSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoublePrimitiveIterator.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoubleSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoubleSequenceMutable.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoubleSequencePlus.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatPrimitiveIterator.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatSequenceMutable.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatSequencePlus.java
trunk/axsl/axsl-speech/src/main/java/org/axsl/speech/Voice.java
Modified: trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml
===================================================================
--- trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml 2026-04-24 18:50:28 UTC (rev 3014)
@@ -244,6 +244,9 @@
</module>
<module name="IllegalType"/>
+ <module name="IllegalType">
+ <property name="illegalClassNames" value="java.lang.Double"/>
+ </module>
<!-- Check for complexity. -->
<module name="CyclomaticComplexity">
@@ -319,8 +322,18 @@
<property name="message" value="Use @throws instead of @exception in Javadoc comments."/>
</module>
+ <module name="RegexpSinglelineJava">
+ <property name="ignoreComments" value="true"/>
+ <property name="format" value="\s(double|float)\s"/>
+ <property name="message" value="Use FixedDecimal for real (non-integer) numbers."/>
+ </module>
+ <!-- Allow float and double where explicitly needed. -->
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="Checkstyle: Allow float and double here."/>
+ <property name="onCommentFormat" value="Checkstyle: Restart float and double checking."/>
+ <property name="checkFormat" value="RegexpSinglelineJava"/>
+ </module>
-
<module name="MissingOverride"/>
</module>
Modified: trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/MeasurementConstants.java
===================================================================
--- trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/MeasurementConstants.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/MeasurementConstants.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -41,7 +41,7 @@
public static final short MILLISECONDS_PER_SECOND = 1_000;
/** The number of centimeters per inch, which is 2.54. */
- public static final float CM_PER_INCH = Float.parseFloat("2.54");
+ public static final Float CM_PER_INCH = Float.parseFloat("2.54");
/** The number of millimeters per centimeter, which is {@value}. */
public static final byte MM_PER_CM = 10;
Modified: trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/TypographicConstants.java
===================================================================
--- trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/TypographicConstants.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/TypographicConstants.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -87,31 +87,31 @@
public static final int FACTOR_HAIR_SPACE_PER_EM = 10;
/** Constant indicating the default line-height factor. */
- public static final float DEFAULT_LINE_HEIGHT_FACTOR = 1.2F;
+ public static final Float DEFAULT_LINE_HEIGHT_FACTOR = 1.2F;
/** Constant indicating the default strikeout position. */
- public static final float DEFAULT_STRIKEOUT_POSITION = .375F;
+ public static final Float DEFAULT_STRIKEOUT_POSITION = .375F;
/** Constant for the default strikout size. The computation is equal to
* 102 / 2048, which factors come from the OpenType manual, Section "OS/2
* table", for the definition of "yStrikeoutSize", where this ratio is
* suggested. */
- public static final float DEFAULT_STRIKEOUT_SIZE = 0.0498046875F;
+ public static final Float DEFAULT_STRIKEOUT_SIZE = 0.0498046875F;
/** Constant for the default underline position. */
- public static final float DEFAULT_UNDERLINE_POSITION = .10F;
+ public static final Float DEFAULT_UNDERLINE_POSITION = .10F;
/** Constant for the default overline position. */
- public static final float DEFAULT_OVERLINE_POSITION = .10F;
+ public static final Float DEFAULT_OVERLINE_POSITION = .10F;
/** Constant for the default hanging baseline position. */
- public static final float DEFAULT_HANGING_BASELINE_POSITION = .3F;
+ public static final Float DEFAULT_HANGING_BASELINE_POSITION = .3F;
/** Constant used to compute subscript baseline shift amounts. */
- public static final float SUBSCRIPT_SHIFT_FACTOR = .6666666666666666667f;
+ public static final Float SUBSCRIPT_SHIFT_FACTOR = .6666666666666666667f;
/** Constant used to compute superscript baseline shift amounts. */
- public static final float SUPERSCRIPT_SHIFT_FACTOR = .6666666666666666667f;
+ public static final Float SUPERSCRIPT_SHIFT_FACTOR = .6666666666666666667f;
/**
* Private constructor. This is a utility class that should never be instantiated.
@@ -145,7 +145,7 @@
* millipoints = proportionOfEmUsed * actualFontSize * 1000.
* which simplifies to
* millipoints = glyphSpaceUnits * fontSize / unitsPerEm. */
- final float raw = glyphSpaceUnits * fontSize / (float) unitsPerEm;
+ final Float raw = glyphSpaceUnits * fontSize / (float) unitsPerEm;
return Math.round(raw);
}
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -447,7 +447,7 @@
* Returns the ItalicAngle value for this font.
* @return The ItalicAngle value, expressed in degrees counterclockwise from vertical.
*/
- float getItalicAngle();
+ Float getItalicAngle();
/**
* Returns the StemV value for this font, used in a PDF Font Descriptor.
@@ -487,7 +487,7 @@
* For example, if the font-size is 12 points, and this method returns 1.2, the computed "normal" line-height is
* 14.4 points.
*/
- float normalLineHeightFactor(Font.LineHeightAlgorithm algorithm);
+ Float normalLineHeightFactor(Font.LineHeightAlgorithm algorithm);
/**
* Returns the location of the specified baseline.
Modified: trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/FoContext.java
===================================================================
--- trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/FoContext.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-fotree/src/main/java/org/axsl/fotree/FoContext.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -163,7 +163,7 @@
* @see "XSL-FO Recommendation 1.1, Section 7.16.4."
* @see <a href="http://www.w3.org/TR/REC-CSS2/visudet.html#propdef-line-height">The CSS Recommendation</a>
*/
- float normalLineHeightFactor();
+ Float normalLineHeightFactor();
/**
* Returns some information about the selected font, to be used in font-related calculations, such as x-height,
Modified: trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpFitnessClass.java
===================================================================
--- trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpFitnessClass.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpFitnessClass.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -52,13 +52,13 @@
/** Constant indicating the top threshold for a tight classification. */
- private static final float TIGHT_TOP_THRESHOLD = (float) -.5;
+ private static final Float TIGHT_TOP_THRESHOLD = (float) -.5;
/** Constant indicating the top threshold for a normal classification. */
- private static final float NORMAL_TOP_THRESHOLD = (float) .5;
+ private static final Float NORMAL_TOP_THRESHOLD = (float) .5;
/** Constant indicating the top threshold for a loose classification. */
- private static final float LOOSE_TOP_THRESHOLD = (float) 1;
+ private static final Float LOOSE_TOP_THRESHOLD = (float) 1;
/** The numeric value assigned to this fitness class. */
private int numericValue;
@@ -77,7 +77,7 @@
* @return The instance of this enumeration that represents {@code adjustmentRatio}.
*/
public static KpFitnessClass fromAdjustmentRatio(final Number adjustmentRatio) {
- final double adjustmentRatioAsDouble = adjustmentRatio.doubleValue();
+ final Float adjustmentRatioAsDouble = adjustmentRatio.floatValue();
if (adjustmentRatioAsDouble < TIGHT_TOP_THRESHOLD) {
return TIGHT;
} else if (adjustmentRatioAsDouble <= NORMAL_TOP_THRESHOLD) {
Modified: trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpUserAgent.java
===================================================================
--- trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpUserAgent.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-kp-model/src/main/java/org/axsl/kp/KpUserAgent.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -83,7 +83,7 @@
* @see "[KP-01], pages 1161–1163, where iterative adjustments to this value are discussed."
* @see "[KP-03], page 114."
*/
- float getAdjustmentRatioTolerance();
+ Float getAdjustmentRatioTolerance();
/**
* Returns the cost that should be assessed, in the Knuth-Plass line-breaking scheme, for a penalty of a given
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractDoubleSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractDoubleSequence.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractDoubleSequence.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -28,6 +28,8 @@
*/
public abstract class AbstractDoubleSequence extends AbstractPrimitiveSequence implements DoubleSequence {
+ /* Checkstyle: Allow float and double here. */
+
/** A magic number used in the computation of the hash code. */
private static final int HASH_FACTOR = 31;
@@ -82,4 +84,6 @@
return result;
}
+ /* Checkstyle: Restart float and double checking. */
+
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractFloatSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractFloatSequence.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractFloatSequence.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -28,6 +28,8 @@
*/
public abstract class AbstractFloatSequence extends AbstractPrimitiveSequence implements FloatSequence {
+ /* Checkstyle: Allow float and double here. */
+
/** A magic number used in the computation of the hash code. */
private static final int HASH_FACTOR = 31;
@@ -80,4 +82,6 @@
return result;
}
+ /* Checkstyle: Restart float and double checking. */
+
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoublePrimitiveIterator.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoublePrimitiveIterator.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoublePrimitiveIterator.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -29,6 +29,8 @@
*/
public interface DoublePrimitiveIterator {
+ /* Checkstyle: Allow float and double here. */
+
/**
* Indicates whether this iterator has at least one more element.
* Follows the semantics of {@link java.util.Iterator#hasNext()}.
@@ -47,4 +49,6 @@
*/
double nextDouble();
+ /* Checkstyle: Restart float and double checking. */
+
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoubleSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoubleSequence.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoubleSequence.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -30,6 +30,8 @@
*/
public interface DoubleSequence {
+ /* Checkstyle: Allow float and double here. */
+
/**
* Returns the length of this double sequence.
* @return The number of {@link Double#TYPE}s in this sequence.
@@ -60,4 +62,6 @@
*/
boolean isMutable();
+ /* Checkstyle: Restart float and double checking. */
+
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoubleSequenceMutable.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoubleSequenceMutable.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoubleSequenceMutable.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -31,6 +31,8 @@
*/
public interface DoubleSequenceMutable extends MutableSequence, DoubleSequencePlus, Swappable {
+ /* Checkstyle: Allow float and double here. */
+
/**
* The double at the specified index is set to {@code newDouble}.
* This sequence is altered to represent a new sequence that is identical to the old sequence, except that it
@@ -137,4 +139,6 @@
return true;
}
+ /* Checkstyle: Restart float and double checking. */
+
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoubleSequencePlus.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoubleSequencePlus.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/DoubleSequencePlus.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -31,6 +31,8 @@
*/
public interface DoubleSequencePlus extends DoubleSequence, Serializable {
+ /* Checkstyle: Allow float and double here. */
+
/**
* Returns a new {@link DoubleSequencePlus} that is a subsequence of this sequence.
* The subsequence starts with the {@link Double#TYPE} value at index {@code start} and ends with the
@@ -112,4 +114,6 @@
*/
boolean isEmpty();
+ /* Checkstyle: Restart float and double checking. */
+
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatPrimitiveIterator.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatPrimitiveIterator.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatPrimitiveIterator.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -29,6 +29,8 @@
*/
public interface FloatPrimitiveIterator {
+ /* Checkstyle: Allow float and double here. */
+
/**
* Indicates whether this iterator has at least one more element.
* Follows the semantics of {@link java.util.Iterator#hasNext()}.
@@ -47,4 +49,6 @@
*/
float nextFloat();
+ /* Checkstyle: Restart float and double checking. */
+
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatSequence.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatSequence.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -30,6 +30,8 @@
*/
public interface FloatSequence {
+ /* Checkstyle: Allow float and double here. */
+
/**
* Returns the length of this float sequence.
* @return The number of {@link Float#TYPE}s in this sequence.
@@ -60,4 +62,6 @@
*/
boolean isMutable();
+ /* Checkstyle: Restart float and double checking. */
+
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatSequenceMutable.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatSequenceMutable.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatSequenceMutable.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -31,6 +31,8 @@
*/
public interface FloatSequenceMutable extends MutableSequence, FloatSequencePlus, Swappable {
+ /* Checkstyle: Allow float and double here. */
+
/**
* The float at the specified index is set to {@code newFloat}.
* This sequence is altered to represent a new sequence that is identical to the old sequence, except that it
@@ -137,4 +139,6 @@
return true;
}
+ /* Checkstyle: Restart float and double checking. */
+
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatSequencePlus.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatSequencePlus.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/FloatSequencePlus.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -31,6 +31,8 @@
*/
public interface FloatSequencePlus extends FloatSequence, Serializable {
+ /* Checkstyle: Allow float and double here. */
+
/**
* Returns a new {@link FloatSequencePlus} that is a subsequence of this sequence.
* The subsequence starts with the {@link Float#TYPE} value at index {@code start} and ends with the
@@ -112,4 +114,6 @@
*/
boolean isEmpty();
+ /* Checkstyle: Restart float and double checking. */
+
}
Modified: trunk/axsl/axsl-speech/src/main/java/org/axsl/speech/Voice.java
===================================================================
--- trunk/axsl/axsl-speech/src/main/java/org/axsl/speech/Voice.java 2026-04-24 16:35:47 UTC (rev 3013)
+++ trunk/axsl/axsl-speech/src/main/java/org/axsl/speech/Voice.java 2026-04-24 18:50:28 UTC (rev 3014)
@@ -40,30 +40,30 @@
* The normal extra-low frequency for this voice family.
* @return The normal extra-low frequency, in hertz, for this voice family.
*/
- float pitchExtraLow();
+ Float pitchExtraLow();
/**
* The normal low frequency for this voice family.
* @return The normal low frequency, in hertz, for this voice family.
*/
- float pitchLow();
+ Float pitchLow();
/**
* The normal medium frequency for this voice family.
* @return The normal medium frequency, in hertz, for this voice family.
*/
- float pitchMedium();
+ Float pitchMedium();
/**
* The normal high frequency for this voice family.
* @return The normal high frequency, in hertz, for this voice family.
*/
- float pitchHigh();
+ Float pitchHigh();
/**
* The normal extra-high frequency for this voice family.
* @return The normal extra-high frequency, in hertz, for this voice family.
*/
- float pitchExtraHigh();
+ Float pitchExtraHigh();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-24 16:35:49
|
Revision: 3013
http://sourceforge.net/p/axsl/code/3013
Author: victormote
Date: 2026-04-24 16:35:47 +0000 (Fri, 24 Apr 2026)
Log Message:
-----------
1. Add methods for basic arithmetic. 2. Add an implementation that wraps a BigDecimal.
Modified Paths:
--------------
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal.java
Added Paths:
-----------
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedBigDecimal.java
Added: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedBigDecimal.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedBigDecimal.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedBigDecimal.java 2026-04-24 16:35:47 UTC (rev 3013)
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.axsl.primitive.fixed;
+
+import java.math.BigDecimal;
+
+/**
+ * <p>Wraps a {@link BigDecimal} instance, adapting it to the {@link FixedDecimal} interface.
+ * This has all of the disadvantages of {@link BigDecimal} plus additional memory usage, but it may be a suitable
+ * solution where those disadvantages are not important.</p>
+ *
+ * <p>API Note: Subclassing {@link BigDecimal} directly is not feasible, as its {@link Comparable} parameter is not
+ * compatible with that of {@link FixedDecimal}.</p>
+ */
+public class FixedBigDecimal implements FixedDecimal {
+
+ /** The instance wrapped by this adapter. */
+ private BigDecimal wrapped;
+
+ /**
+ * Constructor.
+ * @param wrapped The instance to be wrapped by this adapter.
+ */
+ public FixedBigDecimal(final BigDecimal wrapped) {
+ this.wrapped = wrapped;
+ }
+
+ @Override
+ public int scale() {
+ return this.wrapped.scale();
+ }
+
+ @Override
+ public int unscaledValue() {
+ return wrapped.unscaledValue().intValueExact();
+ }
+
+ @Override
+ public BigDecimal toBigDecimal() {
+ return this.wrapped;
+ }
+
+ @Override
+ public int compareTo(final FixedDecimal o) {
+ final BigDecimal otherBd = o instanceof FixedBigDecimal ? ((FixedBigDecimal) o).wrapped : o.toBigDecimal();
+ return this.wrapped.compareTo(otherBd);
+ }
+
+ @Override
+ public FixedDecimal add(final FixedDecimal addend) {
+ return new FixedBigDecimal(this.wrapped.add(addend.toBigDecimal()));
+ }
+
+ @Override
+ public FixedDecimal subtract(final FixedDecimal subtrahend) {
+ return new FixedBigDecimal(this.wrapped.subtract(subtrahend.toBigDecimal()));
+ }
+
+ @Override
+ public FixedDecimal multiply(final FixedDecimal multiplier) {
+ return new FixedBigDecimal(this.wrapped.multiply(multiplier.toBigDecimal()));
+ }
+
+ @Override
+ public FixedDecimal divide(final FixedDecimal divisor) {
+ return new FixedBigDecimal(this.wrapped.divide(divisor.toBigDecimal()));
+ }
+
+}
Property changes on: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedBigDecimal.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal.java 2026-04-24 01:31:49 UTC (rev 3012)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal.java 2026-04-24 16:35:47 UTC (rev 3013)
@@ -23,6 +23,8 @@
package org.axsl.primitive.fixed;
+import java.math.BigDecimal;
+
/**
* <p>Implementations store numeric values with a fixed number of <em>decimal</em> places.
* This is not a true "primitive," but mimics a missing java primitive.
@@ -63,6 +65,14 @@
int unscaledValue();
/**
+ * Returns the value of this as a {@link BigDecimal}.
+ * @return The value of this as a {@link BigDecimal}.
+ */
+ default BigDecimal toBigDecimal() {
+ return BigDecimal.valueOf(unscaledValue(), scale());
+ }
+
+ /**
* Tests for value equality between this and another {@link FixedDecimal} value.
* @param other The fixed-point value being compared.
* @return True if and only if the value of this is equal to the value of {@code other}.
@@ -116,4 +126,33 @@
return this.compareTo(other) >= 0;
}
+
+ /**
+ * Computes and returns the sum of this (the augend) and an addend.
+ * @param addend The amount to be added to this.
+ * @return The sum of this and {@code addend}.
+ */
+ FixedDecimal add(FixedDecimal addend);
+
+ /**
+ * Computes and returns the difference between this (the minuend) less a subtrahend.
+ * @param subtrahend The amount to be subtracted from this.
+ * @return The difference between this and {@code subtrahend}.
+ */
+ FixedDecimal subtract(FixedDecimal subtrahend);
+
+ /**
+ * Computes and returns the product of this (the multiplicand) and a multiplier.
+ * @param multiplier The amount to be multiplied by this.
+ * @return The product of this and {@code multiplier}.
+ */
+ FixedDecimal multiply(FixedDecimal multiplier);
+
+ /**
+ * Computes and returns the quotient of this (the dividend or numerator) and a divisor (or denominator).
+ * @param divisor The amount to be divided into this.
+ * @return The quotient of this and {@code divisor}.
+ */
+ FixedDecimal divide(FixedDecimal divisor);
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-24 01:31:50
|
Revision: 3012
http://sourceforge.net/p/axsl/code/3012
Author: victormote
Date: 2026-04-24 01:31:49 +0000 (Fri, 24 Apr 2026)
Log Message:
-----------
Rename interface for clarity.
Added Paths:
-----------
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal.java
Removed Paths:
-------------
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java
Copied: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal.java (from rev 3011, trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java)
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedDecimal.java 2026-04-24 01:31:49 UTC (rev 3012)
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.axsl.primitive.fixed;
+
+/**
+ * <p>Implementations store numeric values with a fixed number of <em>decimal</em> places.
+ * This is not a true "primitive," but mimics a missing java primitive.
+ * Implementations are expected to be more memory-efficient than {@link java.math.BigDecimal} and avoid the well-known
+ * precision problems of {@link java.lang.Float} and {@link java.lang.Double}.
+ * Implementations are intended to be lightweight substitutions for {@link java.math.BigDecimal}, which has a minimum
+ * memory footprint of 32 bytes.<p>
+ *
+ * <p>Caveat: Please note the use of <em>Decimal</em> in the name of this interface.
+ * The concept of <em>scale</em> as used in this interface refers to base-10.
+ * We must distinguish between 1) fixed-point decimal, used in this interface, which maintains a fixed number of decimal
+ * digits for the fractional portion of the value, and 2) fixed-point binary, which maintains a fixed number of binary
+ * digits (bits) for the fractional portion of the value.
+ * Much of the fixed-point literature refers to fixed-point binary, which has many performance advantages over
+ * fixed-point decimal arithmetic, but which does not map as well to many real-world applications requiring fractional
+ * numbers.
+ * All numbers are stored as base-2 bits internally, but the mapping and manipulation of those bits to and from the
+ * base-10 digits represented by them is an implementation detail.</p>
+ */
+public interface FixedDecimal extends Comparable<FixedDecimal> {
+
+ /**
+ * Returns the <i>scale</i> of this {@code FixedPoint}.
+ * If zero or positive, the scale is the number of digits to the right of the decimal point.
+ * If negative, the unscaled value of the number is multiplied by ten to the power of the negation of the scale.
+ * For example, a scale of {@code -3} means the unscaled value is multiplied by 1000.
+ * @return The scale of this {@code FixedPoint}.
+ * @see java.math.BigDecimal#scale()
+ */
+ int scale();
+
+ /**
+ * Returns the int whose value is the <i>unscaled value</i> of this {@code FixedPoint}.
+ * (Computes <tt>(this * 10<sup>this.scale()</sup>)</tt>.)
+ * @return The unscaled value of this fixed-point number.
+ * @see java.math.BigDecimal#unscaledValue()
+ */
+ int unscaledValue();
+
+ /**
+ * Tests for value equality between this and another {@link FixedDecimal} value.
+ * @param other The fixed-point value being compared.
+ * @return True if and only if the value of this is equal to the value of {@code other}.
+ */
+ default boolean isEqualTo(final FixedDecimal other) {
+ return this.compareTo(other) == 0;
+ }
+
+ /**
+ * Tests for value equality between this and another {@link FixedDecimal} value.
+ * @param other The fixed-point value being compared.
+ * @return True if and only if the value of this is NOT equal to the value of {@code other}.
+ */
+ default boolean isNotEqualTo(final FixedDecimal other) {
+ return ! (this.compareTo(other) == 0);
+ }
+
+ /**
+ * Tests whether the value of this is greater than the value of another {@link FixedDecimal}.
+ * @param other The fixed-point value being compared.
+ * @return True if and only if the value of this is greater than the value of {@code other}.
+ */
+ default boolean isGreaterThan(final FixedDecimal other) {
+ return this.compareTo(other) > 0;
+ }
+
+ /**
+ * Tests whether the value of this is greater than the value of another {@link FixedDecimal}.
+ * @param other The fixed-point value being compared.
+ * @return True if and only if the value of this is NOT greater than the value of {@code other}.
+ */
+ default boolean isNotGreaterThan(final FixedDecimal other) {
+ return this.compareTo(other) <= 0;
+ }
+
+ /**
+ * Tests whether the value of this is less than the value of another {@link FixedDecimal}.
+ * @param other The fixed-point value being compared.
+ * @return True if and only if the value of this is less than the value of {@code other}.
+ */
+ default boolean isLessThan(final FixedDecimal other) {
+ return this.compareTo(other) < 0;
+ }
+
+ /**
+ * Tests whether the value of this is less than the value of another {@link FixedDecimal}.
+ * @param other The fixed-point value being compared.
+ * @return True if and only if the value of this is NOT less than the value of {@code other}.
+ */
+ default boolean isNotLessThan(final FixedDecimal other) {
+ return this.compareTo(other) >= 0;
+ }
+
+}
Deleted: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java 2026-04-23 20:19:58 UTC (rev 3011)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java 2026-04-24 01:31:49 UTC (rev 3012)
@@ -1,114 +0,0 @@
-/*
- * Copyright 2026 The aXSL Project.
- * http://www.axsl.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.axsl.primitive.fixed;
-
-/**
- * <p>Implementations store fixed-point <em>decimal</em> values.
- * This is not a true "primitive," but mimics a missing java primitive.
- * Implementations are expected to be more memory-efficient than {@link java.math.BigDecimal} and avoid the well-known
- * precision problems of {@link java.lang.Float} and {@link java.lang.Double}.
- * Implementations are intended to be lightweight substitutions for {@link java.math.BigDecimal}, which has a minimum
- * memory footprint of 32 bytes.<p>
- *
- * <p>Please note that the concept of <em>scale</em> as used in this interface refers to base-10.
- * Digits (base-10) do not map directly to bits (base-2), and there are some inefficiencies when converting between
- * them.
- * Specifically, the relationship between how base-10 digits are stored as base-2 bits is an implementation detail.
- * Unless specified otherwise, all numeric concepts in this interface are base-10.</p>
- */
-public interface FixedPoint extends Comparable<FixedPoint> {
-
- /**
- * Returns the <i>scale</i> of this {@code FixedPoint}.
- * If zero or positive, the scale is the number of digits to the right of the decimal point.
- * If negative, the unscaled value of the number is multiplied by ten to the power of the negation of the scale.
- * For example, a scale of {@code -3} means the unscaled value is multiplied by 1000.
- * @return The scale of this {@code FixedPoint}.
- * @see java.math.BigDecimal#scale()
- */
- int scale();
-
- /**
- * Returns the int whose value is the <i>unscaled value</i> of this {@code FixedPoint}.
- * (Computes <tt>(this * 10<sup>this.scale()</sup>)</tt>.)
- * @return The unscaled value of this fixed-point number.
- * @see java.math.BigDecimal#unscaledValue()
- */
- int unscaledValue();
-
- /**
- * Tests for value equality between this and another {@link FixedPoint} value.
- * @param other The fixed-point value being compared.
- * @return True if and only if the value of this is equal to the value of {@code other}.
- */
- default boolean isEqualTo(final FixedPoint other) {
- return this.compareTo(other) == 0;
- }
-
- /**
- * Tests for value equality between this and another {@link FixedPoint} value.
- * @param other The fixed-point value being compared.
- * @return True if and only if the value of this is NOT equal to the value of {@code other}.
- */
- default boolean isNotEqualTo(final FixedPoint other) {
- return ! (this.compareTo(other) == 0);
- }
-
- /**
- * Tests whether the value of this is greater than the value of another {@link FixedPoint}.
- * @param other The fixed-point value being compared.
- * @return True if and only if the value of this is greater than the value of {@code other}.
- */
- default boolean isGreaterThan(final FixedPoint other) {
- return this.compareTo(other) > 0;
- }
-
- /**
- * Tests whether the value of this is greater than the value of another {@link FixedPoint}.
- * @param other The fixed-point value being compared.
- * @return True if and only if the value of this is NOT greater than the value of {@code other}.
- */
- default boolean isNotGreaterThan(final FixedPoint other) {
- return this.compareTo(other) <= 0;
- }
-
- /**
- * Tests whether the value of this is less than the value of another {@link FixedPoint}.
- * @param other The fixed-point value being compared.
- * @return True if and only if the value of this is less than the value of {@code other}.
- */
- default boolean isLessThan(final FixedPoint other) {
- return this.compareTo(other) < 0;
- }
-
- /**
- * Tests whether the value of this is less than the value of another {@link FixedPoint}.
- * @param other The fixed-point value being compared.
- * @return True if and only if the value of this is NOT less than the value of {@code other}.
- */
- default boolean isNotLessThan(final FixedPoint other) {
- return this.compareTo(other) >= 0;
- }
-
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-23 20:19:59
|
Revision: 3011
http://sourceforge.net/p/axsl/code/3011
Author: victormote
Date: 2026-04-23 20:19:58 +0000 (Thu, 23 Apr 2026)
Log Message:
-----------
Add default comparison methods.
Modified Paths:
--------------
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java 2026-04-23 19:32:39 UTC (rev 3010)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java 2026-04-23 20:19:58 UTC (rev 3011)
@@ -57,4 +57,58 @@
*/
int unscaledValue();
+ /**
+ * Tests for value equality between this and another {@link FixedPoint} value.
+ * @param other The fixed-point value being compared.
+ * @return True if and only if the value of this is equal to the value of {@code other}.
+ */
+ default boolean isEqualTo(final FixedPoint other) {
+ return this.compareTo(other) == 0;
+ }
+
+ /**
+ * Tests for value equality between this and another {@link FixedPoint} value.
+ * @param other The fixed-point value being compared.
+ * @return True if and only if the value of this is NOT equal to the value of {@code other}.
+ */
+ default boolean isNotEqualTo(final FixedPoint other) {
+ return ! (this.compareTo(other) == 0);
+ }
+
+ /**
+ * Tests whether the value of this is greater than the value of another {@link FixedPoint}.
+ * @param other The fixed-point value being compared.
+ * @return True if and only if the value of this is greater than the value of {@code other}.
+ */
+ default boolean isGreaterThan(final FixedPoint other) {
+ return this.compareTo(other) > 0;
+ }
+
+ /**
+ * Tests whether the value of this is greater than the value of another {@link FixedPoint}.
+ * @param other The fixed-point value being compared.
+ * @return True if and only if the value of this is NOT greater than the value of {@code other}.
+ */
+ default boolean isNotGreaterThan(final FixedPoint other) {
+ return this.compareTo(other) <= 0;
+ }
+
+ /**
+ * Tests whether the value of this is less than the value of another {@link FixedPoint}.
+ * @param other The fixed-point value being compared.
+ * @return True if and only if the value of this is less than the value of {@code other}.
+ */
+ default boolean isLessThan(final FixedPoint other) {
+ return this.compareTo(other) < 0;
+ }
+
+ /**
+ * Tests whether the value of this is less than the value of another {@link FixedPoint}.
+ * @param other The fixed-point value being compared.
+ * @return True if and only if the value of this is NOT less than the value of {@code other}.
+ */
+ default boolean isNotLessThan(final FixedPoint other) {
+ return this.compareTo(other) >= 0;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-23 19:32:40
|
Revision: 3010
http://sourceforge.net/p/axsl/code/3010
Author: victormote
Date: 2026-04-23 19:32:39 +0000 (Thu, 23 Apr 2026)
Log Message:
-----------
Rename method to match similar method in BigDecimal.
Modified Paths:
--------------
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java 2026-04-22 16:18:37 UTC (rev 3009)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java 2026-04-23 19:32:39 UTC (rev 3010)
@@ -24,12 +24,18 @@
package org.axsl.primitive.fixed;
/**
- * Implementations store fixed-point decimal values.
- * This is not a true "primitive," but mimics something missing in java.
- * Implementations are expected to be more memory-efficient than {@link java.math.BigDecimal} and more precise than
- * {@link java.lang.Double}.
- * In general, it is intended for use where {@link java.math.BigDecimal} would be appropriate, but where its large
- * memory footprint (minimum of 32 bytes) is not needed.
+ * <p>Implementations store fixed-point <em>decimal</em> values.
+ * This is not a true "primitive," but mimics a missing java primitive.
+ * Implementations are expected to be more memory-efficient than {@link java.math.BigDecimal} and avoid the well-known
+ * precision problems of {@link java.lang.Float} and {@link java.lang.Double}.
+ * Implementations are intended to be lightweight substitutions for {@link java.math.BigDecimal}, which has a minimum
+ * memory footprint of 32 bytes.<p>
+ *
+ * <p>Please note that the concept of <em>scale</em> as used in this interface refers to base-10.
+ * Digits (base-10) do not map directly to bits (base-2), and there are some inefficiencies when converting between
+ * them.
+ * Specifically, the relationship between how base-10 digits are stored as base-2 bits is an implementation detail.
+ * Unless specified otherwise, all numeric concepts in this interface are base-10.</p>
*/
public interface FixedPoint extends Comparable<FixedPoint> {
@@ -44,9 +50,11 @@
int scale();
/**
- * Returns the unscaled magnitude of this fixed-point number as an integer.
- * @return The magnitude of this fixed-point number.
+ * Returns the int whose value is the <i>unscaled value</i> of this {@code FixedPoint}.
+ * (Computes <tt>(this * 10<sup>this.scale()</sup>)</tt>.)
+ * @return The unscaled value of this fixed-point number.
+ * @see java.math.BigDecimal#unscaledValue()
*/
- int magnitude();
+ int unscaledValue();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-22 16:18:40
|
Revision: 3009
http://sourceforge.net/p/axsl/code/3009
Author: victormote
Date: 2026-04-22 16:18:37 +0000 (Wed, 22 Apr 2026)
Log Message:
-----------
Make FixedPoint implement Comparable.
Modified Paths:
--------------
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java 2026-04-22 13:12:31 UTC (rev 3008)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java 2026-04-22 16:18:37 UTC (rev 3009)
@@ -31,7 +31,7 @@
* In general, it is intended for use where {@link java.math.BigDecimal} would be appropriate, but where its large
* memory footprint (minimum of 32 bytes) is not needed.
*/
-public interface FixedPoint {
+public interface FixedPoint extends Comparable<FixedPoint> {
/**
* Returns the <i>scale</i> of this {@code FixedPoint}.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-22 13:12:33
|
Revision: 3008
http://sourceforge.net/p/axsl/code/3008
Author: victormote
Date: 2026-04-22 13:12:31 +0000 (Wed, 22 Apr 2026)
Log Message:
-----------
Add interface for fixed-point decimal numbers.
Added Paths:
-----------
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/package-info.java
Added: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java 2026-04-22 13:12:31 UTC (rev 3008)
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.axsl.primitive.fixed;
+
+/**
+ * Implementations store fixed-point decimal values.
+ * This is not a true "primitive," but mimics something missing in java.
+ * Implementations are expected to be more memory-efficient than {@link java.math.BigDecimal} and more precise than
+ * {@link java.lang.Double}.
+ * In general, it is intended for use where {@link java.math.BigDecimal} would be appropriate, but where its large
+ * memory footprint (minimum of 32 bytes) is not needed.
+ */
+public interface FixedPoint {
+
+ /**
+ * Returns the <i>scale</i> of this {@code FixedPoint}.
+ * If zero or positive, the scale is the number of digits to the right of the decimal point.
+ * If negative, the unscaled value of the number is multiplied by ten to the power of the negation of the scale.
+ * For example, a scale of {@code -3} means the unscaled value is multiplied by 1000.
+ * @return The scale of this {@code FixedPoint}.
+ * @see java.math.BigDecimal#scale()
+ */
+ int scale();
+
+ /**
+ * Returns the unscaled magnitude of this fixed-point number as an integer.
+ * @return The magnitude of this fixed-point number.
+ */
+ int magnitude();
+
+}
Property changes on: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/FixedPoint.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Added: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/package-info.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/package-info.java (rev 0)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/package-info.java 2026-04-22 13:12:31 UTC (rev 3008)
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2026 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+/**
+ * Support for fixed-point numerics.
+ */
+package org.axsl.primitive.fixed;
Property changes on: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/fixed/package-info.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-21 20:38:52
|
Revision: 3007
http://sourceforge.net/p/axsl/code/3007
Author: victormote
Date: 2026-04-21 20:38:49 +0000 (Tue, 21 Apr 2026)
Log Message:
-----------
Fixes to constant names and types.
Modified Paths:
--------------
trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/TypographicConstants.java
Modified: trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/TypographicConstants.java
===================================================================
--- trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/TypographicConstants.java 2026-04-21 19:39:13 UTC (rev 3006)
+++ trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/TypographicConstants.java 2026-04-21 20:38:49 UTC (rev 3007)
@@ -65,11 +65,11 @@
* 72000 * .0007685 = 55.332.
* The difference is due to the Monotype computation rounding the size of a pica to .166 inches, which is not
* exactly 1/6 of an inch.
- * Since FOray consistently treats one point as being 1/72 of an inch, we will do so here as well.
+ * Since aXSL consistently treats one point as being 1/72 of an inch, we will do so here as well.
* @see <a href="https://books.google.com/books/download/The_monotype_system.pdf?id=6kU5AAAAMAAJ&output=pdf">1912,
* The Monotype System, Philadelphia, Lanston Monotype Machine Co.</a>
*/
- public static final double MILLIPOINTS_PER_MONOTYPE_UNIT = 1_000d / 18d;
+ public static final BigDecimal MILLIPOINTS_PER_MONOTYPE_UNIT = new BigDecimal("55.555556");
/** Constant indicating the ratio between 3-per-em and em. */
public static final int FACTOR_3_PER_EM = 3;
@@ -81,10 +81,10 @@
public static final int FACTOR_6_PER_EM = 6;
/** Constant indicating the ratio between a thin space and em. */
- public static final int FACTOR_THIN_SPACE = 5;
+ public static final int FACTOR_THIN_SPACE_PER_EM = 5;
/** Constant indicating the ratio between a hair space and em. */
- public static final int FACTOR_HAIR_SPACE = 10;
+ public static final int FACTOR_HAIR_SPACE_PER_EM = 10;
/** Constant indicating the default line-height factor. */
public static final float DEFAULT_LINE_HEIGHT_FACTOR = 1.2F;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-21 19:39:15
|
Revision: 3006
http://sourceforge.net/p/axsl/code/3006
Author: victormote
Date: 2026-04-21 19:39:13 +0000 (Tue, 21 Apr 2026)
Log Message:
-----------
Move some typographic constants to the class for that purpose.
Modified Paths:
--------------
trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/TypographicConstants.java
Modified: trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/TypographicConstants.java
===================================================================
--- trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/TypographicConstants.java 2026-04-16 21:14:24 UTC (rev 3005)
+++ trunk/axsl/axsl-constants/src/main/java/org/axsl/constants/TypographicConstants.java 2026-04-21 19:39:13 UTC (rev 3006)
@@ -71,6 +71,48 @@
*/
public static final double MILLIPOINTS_PER_MONOTYPE_UNIT = 1_000d / 18d;
+ /** Constant indicating the ratio between 3-per-em and em. */
+ public static final int FACTOR_3_PER_EM = 3;
+
+ /** Constant indicating the ratio between 4-per-em and em. */
+ public static final int FACTOR_4_PER_EM = 4;
+
+ /** Constant indicating the ratio between 6-per-em and em. */
+ public static final int FACTOR_6_PER_EM = 6;
+
+ /** Constant indicating the ratio between a thin space and em. */
+ public static final int FACTOR_THIN_SPACE = 5;
+
+ /** Constant indicating the ratio between a hair space and em. */
+ public static final int FACTOR_HAIR_SPACE = 10;
+
+ /** Constant indicating the default line-height factor. */
+ public static final float DEFAULT_LINE_HEIGHT_FACTOR = 1.2F;
+
+ /** Constant indicating the default strikeout position. */
+ public static final float DEFAULT_STRIKEOUT_POSITION = .375F;
+
+ /** Constant for the default strikout size. The computation is equal to
+ * 102 / 2048, which factors come from the OpenType manual, Section "OS/2
+ * table", for the definition of "yStrikeoutSize", where this ratio is
+ * suggested. */
+ public static final float DEFAULT_STRIKEOUT_SIZE = 0.0498046875F;
+
+ /** Constant for the default underline position. */
+ public static final float DEFAULT_UNDERLINE_POSITION = .10F;
+
+ /** Constant for the default overline position. */
+ public static final float DEFAULT_OVERLINE_POSITION = .10F;
+
+ /** Constant for the default hanging baseline position. */
+ public static final float DEFAULT_HANGING_BASELINE_POSITION = .3F;
+
+ /** Constant used to compute subscript baseline shift amounts. */
+ public static final float SUBSCRIPT_SHIFT_FACTOR = .6666666666666666667f;
+
+ /** Constant used to compute superscript baseline shift amounts. */
+ public static final float SUPERSCRIPT_SHIFT_FACTOR = .6666666666666666667f;
+
/**
* Private constructor. This is a utility class that should never be instantiated.
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-16 21:14:26
|
Revision: 3005
http://sourceforge.net/p/axsl/code/3005
Author: victormote
Date: 2026-04-16 21:14:24 +0000 (Thu, 16 Apr 2026)
Log Message:
-----------
Add "final" keyword to instance variables in immutable classes.
Modified Paths:
--------------
trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpBoxCharsTf.java
trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpBoxTf.java
trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpGlueCharsTf.java
trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpGlueTf.java
trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpPenaltyCharsTf.java
trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpPenaltyTf.java
trunk/axsl/axsl-orthography/src/main/java/org/axsl/orthography/Lexer.java
Modified: trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpBoxCharsTf.java
===================================================================
--- trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpBoxCharsTf.java 2026-04-16 20:15:57 UTC (rev 3004)
+++ trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpBoxCharsTf.java 2026-04-16 21:14:24 UTC (rev 3005)
@@ -30,7 +30,7 @@
public final class KpBoxCharsTf implements KpBox, CharSequence {
/** The char(s) for this box. */
- private String chars;
+ private final String chars;
/**
* Constructor.
Modified: trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpBoxTf.java
===================================================================
--- trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpBoxTf.java 2026-04-16 20:15:57 UTC (rev 3004)
+++ trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpBoxTf.java 2026-04-16 21:14:24 UTC (rev 3005)
@@ -30,7 +30,7 @@
public final class KpBoxTf implements KpBox {
/** The width of this box, in millipoints. */
- private int width;
+ private final int width;
/**
* Constructor.
Modified: trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpGlueCharsTf.java
===================================================================
--- trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpGlueCharsTf.java 2026-04-16 20:15:57 UTC (rev 3004)
+++ trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpGlueCharsTf.java 2026-04-16 21:14:24 UTC (rev 3005)
@@ -33,7 +33,7 @@
public static final KpGlueCharsTf SPACE = new KpGlueCharsTf(" ");
/** The char(s) for this glue. */
- private String chars;
+ private final String chars;
/**
* Constructor.
Modified: trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpGlueTf.java
===================================================================
--- trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpGlueTf.java 2026-04-16 20:15:57 UTC (rev 3004)
+++ trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpGlueTf.java 2026-04-16 21:14:24 UTC (rev 3005)
@@ -30,13 +30,13 @@
public final class KpGlueTf implements KpGlue {
/** The ideal width of this glue, in millipoints. */
- private int idealWidth;
+ private final int idealWidth;
/** The stretchability of this glue, in millipoints. */
- private int stretchability;
+ private final int stretchability;
/** The shrinkability of this glue, in millipoints. */
- private int shrinkability;
+ private final int shrinkability;
/**
* Constructor.
Modified: trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpPenaltyCharsTf.java
===================================================================
--- trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpPenaltyCharsTf.java 2026-04-16 20:15:57 UTC (rev 3004)
+++ trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpPenaltyCharsTf.java 2026-04-16 21:14:24 UTC (rev 3005)
@@ -30,16 +30,16 @@
public final class KpPenaltyCharsTf implements KpPenalty, CharSequence {
/** The char(s) for this penalty. */
- private String chars;
+ private final String chars;
- /** The width of this penalty, in millipoints. */
- private int width;
+// /** The width of this penalty, in millipoints. */
+// private final int width;
/** The penalty value. */
- private int cost;
+ private final int cost;
/** Indicates whether this is a "flagged" penalty. */
- private boolean flagged;
+ private final boolean flagged;
/**
* Constructor.
@@ -75,7 +75,8 @@
@Override
public int getPenaltyWidth(final KpContext config) {
- return this.width;
+ /* TODO: Add computation. */
+ return 0;
}
@Override
Modified: trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpPenaltyTf.java
===================================================================
--- trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpPenaltyTf.java 2026-04-16 20:15:57 UTC (rev 3004)
+++ trunk/axsl/axsl-kp-model/src/testFixtures/java/org/axsl/kp/KpPenaltyTf.java 2026-04-16 21:14:24 UTC (rev 3005)
@@ -30,13 +30,13 @@
public final class KpPenaltyTf implements KpPenalty {
/** The width of this penalty, in millipoints. */
- private int width;
+ private final int width;
/** The penalty value. */
- private int cost;
+ private final int cost;
/** Indicates whether this is a "flagged" penalty. */
- private boolean flagged;
+ private final boolean flagged;
/**
* Constructor.
Modified: trunk/axsl/axsl-orthography/src/main/java/org/axsl/orthography/Lexer.java
===================================================================
--- trunk/axsl/axsl-orthography/src/main/java/org/axsl/orthography/Lexer.java 2026-04-16 20:15:57 UTC (rev 3004)
+++ trunk/axsl/axsl-orthography/src/main/java/org/axsl/orthography/Lexer.java 2026-04-16 21:14:24 UTC (rev 3005)
@@ -170,19 +170,19 @@
class ImmutableToken implements Token {
/** The text of the token. */
- private String text;
+ private final String text;
/** The type of the token. */
- private TokenType type;
+ private final TokenType type;
/** The writing system of the token. */
- private WritingSystem writingSystem;
+ private final WritingSystem writingSystem;
/** The line, within the Lexer, at which this token begins. */
- private int line;
+ private final int line;
/** The column, within the Lexer, at which this token begins. */
- private int column;
+ private final int column;
/**
* Constructor.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-16 20:16:00
|
Revision: 3004
http://sourceforge.net/p/axsl/code/3004
Author: victormote
Date: 2026-04-16 20:15:57 +0000 (Thu, 16 Apr 2026)
Log Message:
-----------
Complete unification of BoundingBox.
Modified Paths:
--------------
trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/BoundingBox.java
Modified: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/BoundingBox.java
===================================================================
--- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/BoundingBox.java 2026-04-16 19:22:49 UTC (rev 3003)
+++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/BoundingBox.java 2026-04-16 20:15:57 UTC (rev 3004)
@@ -51,17 +51,10 @@
byte UPPER_RIGHT_Y_INDEX = 3;
/**
- * Returns the coordinate value for a given index, cast as a {@link java.lang.Float#TYPE}.
+ * Returns the coordinate value for a given index.
* @param index The index for the coordinate whose value is needed, which must be between 0 and 3 inclusive.
* @return The value for the coordinate at {@code index}.
*/
- float getCoordinateAsFloat(int index);
-
- /**
- * Returns the coordinate value for a given index, cast as a {@link java.lang.Integer#TYPE}.
- * @param index The index for the coordinate whose value is needed, which must be between 0 and 3 inclusive.
- * @return The value for the coordinate at {@code index}.
- */
int getCoordinate(int index);
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-16 19:22:51
|
Revision: 3003
http://sourceforge.net/p/axsl/code/3003
Author: victormote
Date: 2026-04-16 19:22:49 +0000 (Thu, 16 Apr 2026)
Log Message:
-----------
More steps toward unification of BoundingBox.
Modified Paths:
--------------
trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/BoundingBox.java
Modified: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/BoundingBox.java
===================================================================
--- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/BoundingBox.java 2026-04-16 17:57:53 UTC (rev 3002)
+++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/BoundingBox.java 2026-04-16 19:22:49 UTC (rev 3003)
@@ -62,25 +62,25 @@
* @param index The index for the coordinate whose value is needed, which must be between 0 and 3 inclusive.
* @return The value for the coordinate at {@code index}.
*/
- int getCoordinateAsInt(int index);
+ int getCoordinate(int index);
/**
- * Computes the width of this bounding box.
+ * Returns the width of this bounding box.
* @return The width of the bounding box.
*/
- default int computeWidthAsInt() {
- final int urx = getCoordinateAsInt(BoundingBox.UPPER_RIGHT_X_INDEX);
- final int llx = getCoordinateAsInt(BoundingBox.LOWER_LEFT_X_INDEX);
+ default int getWidth() {
+ final int urx = getCoordinate(BoundingBox.UPPER_RIGHT_X_INDEX);
+ final int llx = getCoordinate(BoundingBox.LOWER_LEFT_X_INDEX);
return urx - llx;
}
/**
- * Computes the height of this bounding box.
+ * Returns the height of this bounding box.
* @return The height of the bounding box.
*/
- default int computeHeightAsInt() {
- final int ury = getCoordinateAsInt(BoundingBox.UPPER_RIGHT_Y_INDEX);
- final int lly = getCoordinateAsInt(BoundingBox.LOWER_LEFT_Y_INDEX);
+ default int getHeight() {
+ final int ury = getCoordinate(BoundingBox.UPPER_RIGHT_Y_INDEX);
+ final int lly = getCoordinate(BoundingBox.LOWER_LEFT_Y_INDEX);
return ury - lly;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-04-16 17:57:55
|
Revision: 3002
http://sourceforge.net/p/axsl/code/3002
Author: victormote
Date: 2026-04-16 17:57:53 +0000 (Thu, 16 Apr 2026)
Log Message:
-----------
Steps toward unification of BoundingBox.
Modified Paths:
--------------
trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/BoundingBox.java
Modified: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/BoundingBox.java
===================================================================
--- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/BoundingBox.java 2026-03-31 12:55:14 UTC (rev 3001)
+++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/BoundingBox.java 2026-04-16 17:57:53 UTC (rev 3002)
@@ -68,26 +68,6 @@
* Computes the width of this bounding box.
* @return The width of the bounding box.
*/
- default float computeWidthAsFloat() {
- final float urx = getCoordinateAsFloat(BoundingBox.UPPER_RIGHT_X_INDEX);
- final float llx = getCoordinateAsFloat(BoundingBox.LOWER_LEFT_X_INDEX);
- return urx - llx;
- }
-
- /**
- * Computes the height of this bounding box.
- * @return The height of the bounding box.
- */
- default float computeHeightAsFloat() {
- final float ury = getCoordinateAsFloat(BoundingBox.UPPER_RIGHT_Y_INDEX);
- final float lly = getCoordinateAsFloat(BoundingBox.LOWER_LEFT_Y_INDEX);
- return ury - lly;
- }
-
- /**
- * Computes the width of this bounding box.
- * @return The width of the bounding box.
- */
default int computeWidthAsInt() {
final int urx = getCoordinateAsInt(BoundingBox.UPPER_RIGHT_X_INDEX);
final int llx = getCoordinateAsInt(BoundingBox.LOWER_LEFT_X_INDEX);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-03-31 12:55:16
|
Revision: 3001
http://sourceforge.net/p/axsl/code/3001
Author: victormote
Date: 2026-03-31 12:55:14 +0000 (Tue, 31 Mar 2026)
Log Message:
-----------
Enforce use of assertJ assertions.
Modified Paths:
--------------
trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml
trunk/axsl/axsl-constants/src/test/java/org/axsl/constants/TypographicConstantsTests.java
trunk/axsl/axsl-constants/src/test/java/org/axsl/unicode/UnicodeScriptExtendedTests.java
trunk/axsl/axsl-kp-model/src/test/java/org/axsl/kp/KpBranchTfTests.java
trunk/axsl/axsl-kp-model/src/test/java/org/axsl/kp/KpFitnessClassTests.java
trunk/axsl/axsl-kp-model/src/test/java/org/axsl/kp/KpLeafIteratorTests.java
trunk/axsl/axsl-value/src/test/java/org/axsl/value/ForcePageCountTests.java
Modified: trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml
===================================================================
--- trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml 2026-03-31 12:02:31 UTC (rev 3000)
+++ trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml 2026-03-31 12:55:14 UTC (rev 3001)
@@ -160,12 +160,17 @@
</module>
<module name="ImportOrder">
- <property name="option" value="above"/>
- <property name="groups" value="org.axsl,org,/^(org.junit|org.mockito)/,java,javax"/>
+ <property name="option" value="inflow"/>
+ <property name="groups" value="org.axsl,org,/^(org.junit|org.assertj|org.mockito)/,java,javax"/>
<property name="separated" value="true"/>
<property name="ordered" value="true"/>
</module>
+ <module name="IllegalImport">
+ <!-- Force use of assertJ assertions. -->
+ <property name="illegalPkgs" value="org.junit.jupiter.api.Assertions" />
+ </module>
+
<!-- Don't allow non-private instance variables. -->
<module name="VisibilityModifier"/>
Modified: trunk/axsl/axsl-constants/src/test/java/org/axsl/constants/TypographicConstantsTests.java
===================================================================
--- trunk/axsl/axsl-constants/src/test/java/org/axsl/constants/TypographicConstantsTests.java 2026-03-31 12:02:31 UTC (rev 3000)
+++ trunk/axsl/axsl-constants/src/test/java/org/axsl/constants/TypographicConstantsTests.java 2026-03-31 12:55:14 UTC (rev 3001)
@@ -24,7 +24,6 @@
package org.axsl.constants;
import static org.assertj.core.api.Assertions.assertThat;
-
import org.junit.jupiter.api.Test;
import java.math.BigDecimal;
Modified: trunk/axsl/axsl-constants/src/test/java/org/axsl/unicode/UnicodeScriptExtendedTests.java
===================================================================
--- trunk/axsl/axsl-constants/src/test/java/org/axsl/unicode/UnicodeScriptExtendedTests.java 2026-03-31 12:02:31 UTC (rev 3000)
+++ trunk/axsl/axsl-constants/src/test/java/org/axsl/unicode/UnicodeScriptExtendedTests.java 2026-03-31 12:55:14 UTC (rev 3001)
@@ -22,7 +22,7 @@
*/
package org.axsl.unicode;
-import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test;
import java.lang.Character.UnicodeScript;
@@ -37,16 +37,16 @@
*/
@Test
public void retrievalTest() {
- assertEquals(2, UnicodeScriptExtended.getQtyRanges(UnicodeScript.JAVANESE));
+ assertThat(2).isEqualTo(UnicodeScriptExtended.getQtyRanges(UnicodeScript.JAVANESE));
- assertEquals(236, UnicodeScriptExtended.getRangeIndex(UnicodeScript.JAVANESE, 0));
- assertEquals(238, UnicodeScriptExtended.getRangeIndex(UnicodeScript.JAVANESE, 1));
+ assertThat(236).isEqualTo(UnicodeScriptExtended.getRangeIndex(UnicodeScript.JAVANESE, 0));
+ assertThat(238).isEqualTo(UnicodeScriptExtended.getRangeIndex(UnicodeScript.JAVANESE, 1));
- assertEquals(0xA980, UnicodeScriptExtended.getRangeStart(236));
- assertEquals(0xA9CF - 1, UnicodeScriptExtended.getRangeEnd(236));
+ assertThat(0xA980).isEqualTo(UnicodeScriptExtended.getRangeStart(236));
+ assertThat(0xA9CF - 1).isEqualTo(UnicodeScriptExtended.getRangeEnd(236));
- assertEquals(0xA9D0, UnicodeScriptExtended.getRangeStart(238));
- assertEquals(0xA9E0 - 1, UnicodeScriptExtended.getRangeEnd(238));
+ assertThat(0xA9D0).isEqualTo(UnicodeScriptExtended.getRangeStart(238));
+ assertThat(0xA9E0 - 1).isEqualTo(UnicodeScriptExtended.getRangeEnd(238));
}
}
Modified: trunk/axsl/axsl-kp-model/src/test/java/org/axsl/kp/KpBranchTfTests.java
===================================================================
--- trunk/axsl/axsl-kp-model/src/test/java/org/axsl/kp/KpBranchTfTests.java 2026-03-31 12:02:31 UTC (rev 3000)
+++ trunk/axsl/axsl-kp-model/src/test/java/org/axsl/kp/KpBranchTfTests.java 2026-03-31 12:55:14 UTC (rev 3001)
@@ -24,8 +24,7 @@
package org.axsl.kp;
import static org.assertj.core.api.Assertions.assertThat;
-
-import static org.junit.jupiter.api.Assertions.fail;
+import static org.assertj.core.api.Assertions.fail;
import org.junit.jupiter.api.Test;
/**
Modified: trunk/axsl/axsl-kp-model/src/test/java/org/axsl/kp/KpFitnessClassTests.java
===================================================================
--- trunk/axsl/axsl-kp-model/src/test/java/org/axsl/kp/KpFitnessClassTests.java 2026-03-31 12:02:31 UTC (rev 3000)
+++ trunk/axsl/axsl-kp-model/src/test/java/org/axsl/kp/KpFitnessClassTests.java 2026-03-31 12:55:14 UTC (rev 3001)
@@ -23,7 +23,7 @@
package org.axsl.kp;
-import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test;
/**
@@ -36,14 +36,14 @@
*/
@Test
public void testInitialState() {
- assertEquals(4, KpFitnessClass.values().length);
- assertEquals(KpFitnessClass.TIGHT,
+ assertThat(4).isEqualTo(KpFitnessClass.values().length);
+ assertThat(KpFitnessClass.TIGHT).isEqualTo(
KpFitnessClass.fromNumericValue(KpFitnessClass.TIGHT.getNumericValue()));
- assertEquals(KpFitnessClass.NORMAL,
+ assertThat(KpFitnessClass.NORMAL).isEqualTo(
KpFitnessClass.fromNumericValue(KpFitnessClass.NORMAL.getNumericValue()));
- assertEquals(KpFitnessClass.LOOSE,
+ assertThat(KpFitnessClass.LOOSE).isEqualTo(
KpFitnessClass.fromNumericValue(KpFitnessClass.LOOSE.getNumericValue()));
- assertEquals(KpFitnessClass.VERY_LOOSE,
+ assertThat(KpFitnessClass.VERY_LOOSE).isEqualTo(
KpFitnessClass.fromNumericValue(KpFitnessClass.VERY_LOOSE.getNumericValue()));
}
Modified: trunk/axsl/axsl-kp-model/src/test/java/org/axsl/kp/KpLeafIteratorTests.java
===================================================================
--- trunk/axsl/axsl-kp-model/src/test/java/org/axsl/kp/KpLeafIteratorTests.java 2026-03-31 12:02:31 UTC (rev 3000)
+++ trunk/axsl/axsl-kp-model/src/test/java/org/axsl/kp/KpLeafIteratorTests.java 2026-03-31 12:55:14 UTC (rev 3001)
@@ -23,8 +23,9 @@
package org.axsl.kp;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.fail;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+import static org.assertj.core.api.Assertions.fail;
import org.junit.jupiter.api.Test;
import java.util.NoSuchElementException;
@@ -46,11 +47,11 @@
private void iteratorAssertions(final KpLeafIterator iterator, final boolean expectedHasNext,
final boolean expectedHasPrevious, final int expectedNextIndex, final int expectedPreviousIndex,
final int expectedDepth) {
- assertEquals(expectedHasNext, iterator.hasNext());
- assertEquals(expectedHasPrevious, iterator.hasPrevious());
- assertEquals(expectedNextIndex, iterator.nextIndex());
- assertEquals(expectedPreviousIndex, iterator.previousIndex());
- assertEquals(expectedDepth, iterator.depth());
+ assertThat(expectedHasNext).isEqualTo(iterator.hasNext());
+ assertThat(expectedHasPrevious).isEqualTo(iterator.hasPrevious());
+ assertThat(expectedNextIndex).isEqualTo(iterator.nextIndex());
+ assertThat(expectedPreviousIndex).isEqualTo(iterator.previousIndex());
+ assertThat(expectedDepth).isEqualTo(iterator.depth());
}
/**
@@ -61,7 +62,7 @@
private void leafNodeAssertions(final String expectedText, final KpLeaf leaf) {
if (leaf instanceof CharSequence) {
final CharSequence chars = (CharSequence) leaf;
- assertEquals(expectedText, chars.toString());
+ assertThat(expectedText).isEqualTo(chars.toString());
} else {
fail("Expected text node here.");
}
@@ -146,13 +147,10 @@
/* We just retrieved the first node using previous(). The cursor is sitting before index 0. Another previous()
* should throw an exception. */
- try {
+ assertThatThrownBy(() -> {
out.previous();
- fail("Exception expected here.");
- } catch (final NoSuchElementException e) {
- /* This is the expected case. */
- assertEquals("There is no \"previous\" leaf.", e.getMessage());
- }
+ }).isInstanceOf(NoSuchElementException.class)
+ .hasMessageMatching("There is no \"previous\" leaf.");
}
/**
@@ -164,13 +162,10 @@
final KpLeafIterator out = new KpLeafIterator(para);
iteratorAssertions(out, true, false, 0, -1, 1);
- try {
+ assertThatThrownBy(() -> {
out.previous();
- fail("Exception expected here.");
- } catch (final NoSuchElementException e) {
- /* This is the expected case. */
- assertEquals("There is no \"previous\" leaf.", e.getMessage());
- }
+ }).isInstanceOf(NoSuchElementException.class)
+ .hasMessageMatching("There is no \"previous\" leaf.");
}
/**
@@ -190,13 +185,10 @@
/* Make sure we are where we think we are. */
iteratorAssertions(out, false, true, 50, 49, 2);
- try {
+ assertThatThrownBy(() -> {
out.next();
- fail("Exception expected here.");
- } catch (final NoSuchElementException e) {
- /* This is the expected case. */
- assertEquals("There is no \"next\" leaf.", e.getMessage());
- }
+ }).isInstanceOf(NoSuchElementException.class)
+ .hasMessageMatching("There is no \"next\" leaf.");
}
}
Modified: trunk/axsl/axsl-value/src/test/java/org/axsl/value/ForcePageCountTests.java
===================================================================
--- trunk/axsl/axsl-value/src/test/java/org/axsl/value/ForcePageCountTests.java 2026-03-31 12:02:31 UTC (rev 3000)
+++ trunk/axsl/axsl-value/src/test/java/org/axsl/value/ForcePageCountTests.java 2026-03-31 12:55:14 UTC (rev 3001)
@@ -24,7 +24,6 @@
package org.axsl.value;
import static org.assertj.core.api.Assertions.assertThat;
-
import org.junit.jupiter.api.Test;
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-03-31 12:02:33
|
Revision: 3000
http://sourceforge.net/p/axsl/code/3000
Author: victormote
Date: 2026-03-31 12:02:31 +0000 (Tue, 31 Mar 2026)
Log Message:
-----------
Remove some no-longer-needed Maven configurations.
Removed Paths:
-------------
trunk/axsl/axsl-00-dev/ide/maven/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-03-31 12:00:48
|
Revision: 2999
http://sourceforge.net/p/axsl/code/2999
Author: victormote
Date: 2026-03-31 12:00:45 +0000 (Tue, 31 Mar 2026)
Log Message:
-----------
Move Eclipse-related config to the correct directory.
Added Paths:
-----------
trunk/axsl/axsl-00-dev/ide/eclipse/org.eclipse.jdt.core.prefs
trunk/axsl/axsl-00-dev/ide/eclipse/org.eclipse.jdt.ui.prefs
Removed Paths:
-------------
trunk/axsl/axsl-00-dev/ide/maven/eclipse/org.eclipse.jdt.core.prefs
trunk/axsl/axsl-00-dev/ide/maven/eclipse/org.eclipse.jdt.ui.prefs
Copied: trunk/axsl/axsl-00-dev/ide/eclipse/org.eclipse.jdt.core.prefs (from rev 2998, trunk/axsl/axsl-00-dev/ide/maven/eclipse/org.eclipse.jdt.core.prefs)
===================================================================
--- trunk/axsl/axsl-00-dev/ide/eclipse/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/axsl/axsl-00-dev/ide/eclipse/org.eclipse.jdt.core.prefs 2026-03-31 12:00:45 UTC (rev 2999)
@@ -0,0 +1,87 @@
+#Tue Feb 02 21:30:04 MST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
Copied: trunk/axsl/axsl-00-dev/ide/eclipse/org.eclipse.jdt.ui.prefs (from rev 2998, trunk/axsl/axsl-00-dev/ide/maven/eclipse/org.eclipse.jdt.ui.prefs)
===================================================================
--- trunk/axsl/axsl-00-dev/ide/eclipse/org.eclipse.jdt.ui.prefs (rev 0)
+++ trunk/axsl/axsl-00-dev/ide/eclipse/org.eclipse.jdt.ui.prefs 2026-03-31 12:00:45 UTC (rev 2999)
@@ -0,0 +1,3 @@
+#Thu Feb 01 18:30:48 MST 2007
+eclipse.preferences.version=1
+internal.default.compliance=default
Deleted: trunk/axsl/axsl-00-dev/ide/maven/eclipse/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/axsl/axsl-00-dev/ide/maven/eclipse/org.eclipse.jdt.core.prefs 2026-03-31 11:59:33 UTC (rev 2998)
+++ trunk/axsl/axsl-00-dev/ide/maven/eclipse/org.eclipse.jdt.core.prefs 2026-03-31 12:00:45 UTC (rev 2999)
@@ -1,87 +0,0 @@
-#Tue Feb 02 21:30:04 MST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
Deleted: trunk/axsl/axsl-00-dev/ide/maven/eclipse/org.eclipse.jdt.ui.prefs
===================================================================
--- trunk/axsl/axsl-00-dev/ide/maven/eclipse/org.eclipse.jdt.ui.prefs 2026-03-31 11:59:33 UTC (rev 2998)
+++ trunk/axsl/axsl-00-dev/ide/maven/eclipse/org.eclipse.jdt.ui.prefs 2026-03-31 12:00:45 UTC (rev 2999)
@@ -1,3 +0,0 @@
-#Thu Feb 01 18:30:48 MST 2007
-eclipse.preferences.version=1
-internal.default.compliance=default
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-03-31 11:59:35
|
Revision: 2998
http://sourceforge.net/p/axsl/code/2998
Author: victormote
Date: 2026-03-31 11:59:33 +0000 (Tue, 31 Mar 2026)
Log Message:
-----------
Rename directory for clarity.
Added Paths:
-----------
trunk/axsl/axsl-00-dev/ide/
Removed Paths:
-------------
trunk/axsl/axsl-00-dev/scripts/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2026-03-31 11:57:07
|
Revision: 2997
http://sourceforge.net/p/axsl/code/2997
Author: victormote
Date: 2026-03-31 11:57:06 +0000 (Tue, 31 Mar 2026)
Log Message:
-----------
Remove some no-longer-needed Maven configurations.
Removed Paths:
-------------
trunk/axsl/axsl-00-dev/scripts/maven/build/
trunk/axsl/axsl-00-dev/scripts/maven/eclipse/org.maven.ide.eclipse.prefs
Deleted: trunk/axsl/axsl-00-dev/scripts/maven/eclipse/org.maven.ide.eclipse.prefs
===================================================================
--- trunk/axsl/axsl-00-dev/scripts/maven/eclipse/org.maven.ide.eclipse.prefs 2026-03-30 23:57:08 UTC (rev 2996)
+++ trunk/axsl/axsl-00-dev/scripts/maven/eclipse/org.maven.ide.eclipse.prefs 2026-03-31 11:57:06 UTC (rev 2997)
@@ -1,9 +0,0 @@
-#Sat May 01 09:31:52 MDT 2010
-activeProfiles=
-eclipse.preferences.version=1
-fullBuildGoals=process-test-resources
-includeModules=false
-resolveWorkspaceProjects=true
-resourceFilterGoals=process-resources resources\:testResources
-skipCompilerPlugin=true
-version=1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|