From 6e4e7a899dfc2fe4326e115c1f166842cfe7d73a Mon Sep 17 00:00:00 2001 From: Zachary Bischoff <116595361+bischoffz@users.noreply.github.com> Date: Fri, 8 Sep 2023 14:44:57 -0400 Subject: [PATCH 01/30] Update pom.xml --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d1e669c..083c861 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ gov.hhs.aspr.ms util - 4.0.0 + 4.1.0-SNAPSHOT jar Modeling Utils @@ -215,4 +215,4 @@ - \ No newline at end of file + From fa9673469bfba8645e17446e0a83f5aae615b5ed Mon Sep 17 00:00:00 2001 From: shawnhatch Date: Thu, 1 Feb 2024 12:28:24 -0500 Subject: [PATCH 02/30] Added array indexers --- src/main/java/util/indexer/Indexer2.java | 63 ++++++++++++++++ src/main/java/util/indexer/Indexer3.java | 63 ++++++++++++++++ src/main/java/util/indexer/Indexer4.java | 70 ++++++++++++++++++ src/main/java/util/indexer/Indexer5.java | 76 ++++++++++++++++++++ src/main/java/util/indexer/IndexerError.java | 27 +++++++ 5 files changed, 299 insertions(+) create mode 100644 src/main/java/util/indexer/Indexer2.java create mode 100644 src/main/java/util/indexer/Indexer3.java create mode 100644 src/main/java/util/indexer/Indexer4.java create mode 100644 src/main/java/util/indexer/Indexer5.java create mode 100644 src/main/java/util/indexer/IndexerError.java diff --git a/src/main/java/util/indexer/Indexer2.java b/src/main/java/util/indexer/Indexer2.java new file mode 100644 index 0000000..11e1413 --- /dev/null +++ b/src/main/java/util/indexer/Indexer2.java @@ -0,0 +1,63 @@ +package util.indexer; + +import net.jcip.annotations.ThreadSafe; +import util.errors.ContractException; + +/** + * A thread safe, immutable index converter that supports treating a 2D array as + * a 1D array. + */ + +@ThreadSafe +public final class Indexer2 { + + private final int size; + + private final int p1; + + /** + * Constructs an 2D indexer from the given dimension sizes + * + * @throws ContractException + * + * + * + */ + public Indexer2(final int dim1, final int dim2) { + if (dim1 < 0) { + throw new ContractException(IndexerError.NEGATIVE_DIMENSION_SIZE); + } + if (dim2 < 0) { + throw new ContractException(IndexerError.NEGATIVE_DIMENSION_SIZE); + } + try { + p1 = dim2; + size = Math.multiplyExact(p1, dim1); + } catch (ArithmeticException e) { + throw new ContractException(IndexerError.EXCEEDS_MAX_ARRAY_SIZE); + } + } + + /** + * Returns the combined index = index1*dim2+index2 from the given index values. + * No validation of the indexes or the result is provided. + */ + public int index(final int index1, final int index2) { + return index1 * p1 + index2; + } + + /** + * Returns the size (product of the dimensions) of the array supported by this + * index. + */ + public int size() { + return size; + } + +} diff --git a/src/main/java/util/indexer/Indexer3.java b/src/main/java/util/indexer/Indexer3.java new file mode 100644 index 0000000..e86dd76 --- /dev/null +++ b/src/main/java/util/indexer/Indexer3.java @@ -0,0 +1,63 @@ +package util.indexer; + +import util.errors.ContractException; + +/** + * A thread safe, immutable index converter that supports treating a 3D array as + * a 1D array. + */ +public final class Indexer3 { + private final int size; + private final int p1; + private final int p2; + + /** + * Constructs an 3D indexer from the given dimension sizes + * + * @throws ContractException + * + * + * + */ + public Indexer3(final int dim1, final int dim2, final int dim3) { + if (dim1 < 0) { + throw new ContractException(IndexerError.NEGATIVE_DIMENSION_SIZE); + } + if (dim2 < 0) { + throw new ContractException(IndexerError.NEGATIVE_DIMENSION_SIZE); + } + if (dim3 < 0) { + throw new ContractException(IndexerError.NEGATIVE_DIMENSION_SIZE); + } + + try { + p2 = dim3; + p1 = Math.multiplyExact(p2, dim2); + size = Math.multiplyExact(p1, dim1); + } catch (ArithmeticException e) { + throw new ContractException(IndexerError.EXCEEDS_MAX_ARRAY_SIZE); + } + } + + /** + * Returns the combined index = (index1*dim2 +index2)*dim3+index3 from the given + * index values. No validation of the indexes or the result is provided. + */ + public int index(final int index1, final int index2, final int index3) { + return index1 * p1 + index2 * p2 + index3; + } + + /** + * Returns the size (product of the dimensions) of the array supported by this + * index. + */ + public int size() { + return size; + } +} diff --git a/src/main/java/util/indexer/Indexer4.java b/src/main/java/util/indexer/Indexer4.java new file mode 100644 index 0000000..bbe3641 --- /dev/null +++ b/src/main/java/util/indexer/Indexer4.java @@ -0,0 +1,70 @@ +package util.indexer; + +import util.errors.ContractException; + +/** + * A thread safe, immutable index converter that supports treating a 4D array as + * a 1D array. + */ +public final class Indexer4 { + private final int size; + private final int p1; + private final int p2; + private final int p3; + + /** + * Constructs an 4D indexer from the given dimension sizes + * + * @throws ContractException + * + * + * + */ + public Indexer4(final int dim1, final int dim2, final int dim3, final int dim4) { + if (dim1 < 0) { + throw new ContractException(IndexerError.NEGATIVE_DIMENSION_SIZE); + } + if (dim2 < 0) { + throw new ContractException(IndexerError.NEGATIVE_DIMENSION_SIZE); + } + if (dim3 < 0) { + throw new ContractException(IndexerError.NEGATIVE_DIMENSION_SIZE); + } + if (dim4 < 0) { + throw new ContractException(IndexerError.NEGATIVE_DIMENSION_SIZE); + } + + try { + p3 = dim4; + p2 = Math.multiplyExact(p3, dim3); + p1 = Math.multiplyExact(p2, dim2); + size = Math.multiplyExact(p1, dim1); + } catch (ArithmeticException e) { + throw new ContractException(IndexerError.EXCEEDS_MAX_ARRAY_SIZE); + } + } + + /** + * Returns the combined index = ((index1*dim2 +index2)*dim3+index3)*dim4+index4 + * from the given index values. No validation of the indexes or the result is + * provided. + */ + public int index(final int index1, final int index2, final int index3, final int index4) { + return index1 * p1 + index2 * p2 + index3 * p3 + index4; + } + + /** + * Returns the size (product of the dimensions) of the array supported by this + * index. + */ + public int size() { + return size; + } + +} diff --git a/src/main/java/util/indexer/Indexer5.java b/src/main/java/util/indexer/Indexer5.java new file mode 100644 index 0000000..ad26f32 --- /dev/null +++ b/src/main/java/util/indexer/Indexer5.java @@ -0,0 +1,76 @@ +package util.indexer; + +import util.errors.ContractException; + +/** + * A thread safe, immutable index converter that supports treating a 5D array as + * a 1D array. + */ +public final class Indexer5 { + private final int size; + private final int p1; + private final int p2; + private final int p3; + private final int p4; + + /** + * Constructs an 5D indexer from the given dimension sizes + * + * @throws ContractException + * + * + * + */ + public Indexer5(final int dim1, final int dim2, final int dim3, final int dim4, final int dim5) { + if (dim1 < 0) { + throw new ContractException(IndexerError.NEGATIVE_DIMENSION_SIZE); + } + if (dim2 < 0) { + throw new ContractException(IndexerError.NEGATIVE_DIMENSION_SIZE); + } + if (dim3 < 0) { + throw new ContractException(IndexerError.NEGATIVE_DIMENSION_SIZE); + } + if (dim4 < 0) { + throw new ContractException(IndexerError.NEGATIVE_DIMENSION_SIZE); + } + if (dim5 < 0) { + throw new ContractException(IndexerError.NEGATIVE_DIMENSION_SIZE); + } + + try { + p4 = dim5; + p3 = Math.multiplyExact(p4, dim4); + p2 = Math.multiplyExact(p3, dim3); + p1 = Math.multiplyExact(p2, dim2); + size = Math.multiplyExact(p1, dim1); + } catch (ArithmeticException e) { + throw new ContractException(IndexerError.EXCEEDS_MAX_ARRAY_SIZE); + } + + } + + /** + * Returns the combined index = (((index1*dim2 + * +index2)*dim3+index3)*dim4+index4)*dim5+index5 from the given index values. + * No validation of the indexes or the result is provided. + */ + public int index(final int index1, final int index2, final int index3, final int index4, final int index5) { + return index1 * p1 + index2 * p2 + index3 * p3 + index4 * p4 + index5; + } + + /** + * Returns the size (product of the dimensions) of the array supported by this + * index. + */ + public int size() { + return size; + } + +} diff --git a/src/main/java/util/indexer/IndexerError.java b/src/main/java/util/indexer/IndexerError.java new file mode 100644 index 0000000..407264a --- /dev/null +++ b/src/main/java/util/indexer/IndexerError.java @@ -0,0 +1,27 @@ +package util.indexer; + +import util.errors.ContractError; +import util.errors.ContractException; + +/** + * An enumeration supporting {@link ContractException} that acts as a general + * description of the exception. + */ +public enum IndexerError implements ContractError { + NEGATIVE_DIMENSION_SIZE("Negative dimension size"), + EXCEEDS_MAX_ARRAY_SIZE("The size exceeds max int"), + ; + + + + private final String description; + + private IndexerError(final String description) { + this.description = description; + } + + @Override + public String getDescription() { + return description; + } +} From 47cf94fd3fcadba341e75ff122bb5b54edf3e7c2 Mon Sep 17 00:00:00 2001 From: shawnhatch Date: Thu, 1 Feb 2024 14:24:59 -0500 Subject: [PATCH 03/30] Addded array indexers --- src/test/java/util/indexer/AT_Indexer2.java | 73 ++++++++++++++ src/test/java/util/indexer/AT_Indexer3.java | 80 +++++++++++++++ src/test/java/util/indexer/AT_Indexer4.java | 86 ++++++++++++++++ src/test/java/util/indexer/AT_Indexer5.java | 98 +++++++++++++++++++ .../java/util/indexer/AT_IndexerError.java | 36 +++++++ 5 files changed, 373 insertions(+) create mode 100644 src/test/java/util/indexer/AT_Indexer2.java create mode 100644 src/test/java/util/indexer/AT_Indexer3.java create mode 100644 src/test/java/util/indexer/AT_Indexer4.java create mode 100644 src/test/java/util/indexer/AT_Indexer5.java create mode 100644 src/test/java/util/indexer/AT_IndexerError.java diff --git a/src/test/java/util/indexer/AT_Indexer2.java b/src/test/java/util/indexer/AT_Indexer2.java new file mode 100644 index 0000000..1805f0a --- /dev/null +++ b/src/test/java/util/indexer/AT_Indexer2.java @@ -0,0 +1,73 @@ +package util.indexer; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.apache.commons.math3.random.RandomGenerator; +import org.apache.commons.math3.util.FastMath; +import org.junit.jupiter.api.Test; + +import util.annotations.UnitTestConstructor; +import util.annotations.UnitTestMethod; +import util.errors.ContractException; +import util.random.RandomGeneratorProvider; + +public class AT_Indexer2 { + @Test + @UnitTestConstructor(target = Indexer2.class, args = { int.class, int.class }) + public void testIndexer2() { + + // precondition test: if any dimension has a negative size + + ContractException contractException = assertThrows(ContractException.class, () -> new Indexer2(-1, 1)); + assertEquals(IndexerError.NEGATIVE_DIMENSION_SIZE, contractException.getErrorType()); + + contractException = assertThrows(ContractException.class, () -> new Indexer2(1, -1)); + assertEquals(IndexerError.NEGATIVE_DIMENSION_SIZE, contractException.getErrorType()); + + // precondition test: if the product of the dimensions exceeds max int + int n = (int) FastMath.pow(Integer.MAX_VALUE, 1.0 / 2) + 1; + + contractException = assertThrows(ContractException.class, () -> new Indexer2(n, n)); + assertEquals(IndexerError.EXCEEDS_MAX_ARRAY_SIZE, contractException.getErrorType()); + + } + + @Test + @UnitTestMethod(target = Indexer2.class, name = "index", args = { int.class, int.class }) + public void testIndex() { + RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(6937151566492160140L); + + //show that index = index1*dim2+index2 + + for (int i = 0; i < 30; i++) { + int dim1 = randomGenerator.nextInt(30) + 1; + int dim2 = randomGenerator.nextInt(30) + 1; + + Indexer2 indexer2 = new Indexer2(dim1, dim2); + + for (int j = 0; j < 100; j++) { + + int index1 = randomGenerator.nextInt(dim1); + int index2 = randomGenerator.nextInt(dim2); + + assertEquals(index1 * dim2 + index2, indexer2.index(index1, index2)); + } + } + } + + @Test + @UnitTestMethod(target = Indexer2.class, name = "size", args = {}) + public void testSize() { + RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(1286993379829775736L); + + for (int i = 0; i < 30; i++) { + int dim1 = randomGenerator.nextInt(30) + 1; + int dim2 = randomGenerator.nextInt(30) + 1; + + Indexer2 indexer2 = new Indexer2(dim1, dim2); + + assertEquals(dim1*dim2, indexer2.size()); + } + } +} diff --git a/src/test/java/util/indexer/AT_Indexer3.java b/src/test/java/util/indexer/AT_Indexer3.java new file mode 100644 index 0000000..ec3467e --- /dev/null +++ b/src/test/java/util/indexer/AT_Indexer3.java @@ -0,0 +1,80 @@ +package util.indexer; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.apache.commons.math3.random.RandomGenerator; +import org.apache.commons.math3.util.FastMath; +import org.junit.jupiter.api.Test; + +import util.annotations.UnitTestConstructor; +import util.annotations.UnitTestMethod; +import util.errors.ContractException; +import util.random.RandomGeneratorProvider; + +public class AT_Indexer3 { + @Test + @UnitTestConstructor(target = Indexer3.class, args = { int.class, int.class, int.class }) + public void testIndexer3() { + + // precondition test: if any dimension has a negative size + + ContractException contractException = assertThrows(ContractException.class, () -> new Indexer3(-1, 1,1)); + assertEquals(IndexerError.NEGATIVE_DIMENSION_SIZE, contractException.getErrorType()); + + contractException = assertThrows(ContractException.class, () -> new Indexer3(1, -1,1)); + assertEquals(IndexerError.NEGATIVE_DIMENSION_SIZE, contractException.getErrorType()); + + contractException = assertThrows(ContractException.class, () -> new Indexer3(1, 1,-1)); + assertEquals(IndexerError.NEGATIVE_DIMENSION_SIZE, contractException.getErrorType()); + + + // precondition test: if the product of the dimensions exceeds max int + int n = (int) FastMath.pow(Integer.MAX_VALUE, 1.0 / 3) + 1; + + contractException = assertThrows(ContractException.class, () -> new Indexer3(n, n, n)); + assertEquals(IndexerError.EXCEEDS_MAX_ARRAY_SIZE, contractException.getErrorType()); + + } + + @Test + @UnitTestMethod(target = Indexer3.class, name = "index", args = { int.class, int.class, int.class }) + public void testIndex() { + RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(6937151566492160140L); + + //show that index = (index1*dim2 +index2)*dim3+index3 + + for (int i = 0; i < 30; i++) { + int dim1 = randomGenerator.nextInt(30) + 1; + int dim2 = randomGenerator.nextInt(30) + 1; + int dim3 = randomGenerator.nextInt(30) + 1; + + Indexer3 indexer3 = new Indexer3(dim1, dim2,dim3); + + for (int j = 0; j < 100; j++) { + + int index1 = randomGenerator.nextInt(dim1); + int index2 = randomGenerator.nextInt(dim2); + int index3 = randomGenerator.nextInt(dim3); + + assertEquals((index1*dim2 +index2)*dim3+index3, indexer3.index(index1, index2,index3)); + } + } + } + + @Test + @UnitTestMethod(target = Indexer3.class, name = "size", args = {}) + public void testSize() { + RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(1286993379829775736L); + + for (int i = 0; i < 30; i++) { + int dim1 = randomGenerator.nextInt(30) + 1; + int dim2 = randomGenerator.nextInt(30) + 1; + int dim3 = randomGenerator.nextInt(30) + 1; + + Indexer3 indexer3 = new Indexer3(dim1, dim2,dim3); + + assertEquals(dim1*dim2*dim3, indexer3.size()); + } + } +} diff --git a/src/test/java/util/indexer/AT_Indexer4.java b/src/test/java/util/indexer/AT_Indexer4.java new file mode 100644 index 0000000..56f743a --- /dev/null +++ b/src/test/java/util/indexer/AT_Indexer4.java @@ -0,0 +1,86 @@ +package util.indexer; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.apache.commons.math3.random.RandomGenerator; +import org.apache.commons.math3.util.FastMath; +import org.junit.jupiter.api.Test; + +import util.annotations.UnitTestConstructor; +import util.annotations.UnitTestMethod; +import util.errors.ContractException; +import util.random.RandomGeneratorProvider; + +public class AT_Indexer4 { + @Test + @UnitTestConstructor(target = Indexer4.class, args = { int.class, int.class, int.class, int.class }) + public void testIndexer4() { + + // precondition test: if any dimension has a negative size + + ContractException contractException = assertThrows(ContractException.class, () -> new Indexer4(-1, 1, 1, 1)); + assertEquals(IndexerError.NEGATIVE_DIMENSION_SIZE, contractException.getErrorType()); + + contractException = assertThrows(ContractException.class, () -> new Indexer4(1, -1, 1, 1)); + assertEquals(IndexerError.NEGATIVE_DIMENSION_SIZE, contractException.getErrorType()); + + contractException = assertThrows(ContractException.class, () -> new Indexer4(1, 1, -1, 1)); + assertEquals(IndexerError.NEGATIVE_DIMENSION_SIZE, contractException.getErrorType()); + + contractException = assertThrows(ContractException.class, () -> new Indexer4(1, 1, 1, -1)); + assertEquals(IndexerError.NEGATIVE_DIMENSION_SIZE, contractException.getErrorType()); + + // precondition test: if the product of the dimensions exceeds max int + int n = (int) FastMath.pow(Integer.MAX_VALUE, 1.0 / 4) + 1; + + contractException = assertThrows(ContractException.class, () -> new Indexer4(n, n, n, n)); + assertEquals(IndexerError.EXCEEDS_MAX_ARRAY_SIZE, contractException.getErrorType()); + + } + + @Test + @UnitTestMethod(target = Indexer4.class, name = "index", args = { int.class, int.class, int.class, int.class }) + public void testIndex() { + RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(6937151566492160140L); + + // show that index = ((index1 * dim2 + index2) * dim3 + index3) * dim4 + index4 + + for (int i = 0; i < 30; i++) { + int dim1 = randomGenerator.nextInt(30) + 1; + int dim2 = randomGenerator.nextInt(30) + 1; + int dim3 = randomGenerator.nextInt(30) + 1; + int dim4 = randomGenerator.nextInt(30) + 1; + + Indexer4 indexer4 = new Indexer4(dim1, dim2, dim3, dim4); + + for (int j = 0; j < 100; j++) { + + int index1 = randomGenerator.nextInt(dim1); + int index2 = randomGenerator.nextInt(dim2); + int index3 = randomGenerator.nextInt(dim3); + int index4 = randomGenerator.nextInt(dim4); + + assertEquals(((index1 * dim2 + index2) * dim3 + index3) * dim4 + index4, + indexer4.index(index1, index2, index3, index4)); + } + } + } + + @Test + @UnitTestMethod(target = Indexer4.class, name = "size", args = { }) + public void testSize() { + RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(1286993379829775736L); + + for (int i = 0; i < 30; i++) { + int dim1 = randomGenerator.nextInt(30) + 1; + int dim2 = randomGenerator.nextInt(30) + 1; + int dim3 = randomGenerator.nextInt(30) + 1; + int dim4 = randomGenerator.nextInt(30) + 1; + + Indexer4 Indexer4 = new Indexer4(dim1, dim2, dim3, dim4); + + assertEquals(dim1 * dim2 * dim3 * dim4, Indexer4.size()); + } + } +} diff --git a/src/test/java/util/indexer/AT_Indexer5.java b/src/test/java/util/indexer/AT_Indexer5.java new file mode 100644 index 0000000..407b3b2 --- /dev/null +++ b/src/test/java/util/indexer/AT_Indexer5.java @@ -0,0 +1,98 @@ +package util.indexer; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.apache.commons.math3.random.RandomGenerator; +import org.apache.commons.math3.util.FastMath; +import org.junit.jupiter.api.Test; + +import util.annotations.UnitTestConstructor; +import util.annotations.UnitTestMethod; +import util.errors.ContractException; +import util.random.RandomGeneratorProvider; + +public class AT_Indexer5 { + @Test + @UnitTestConstructor(target = Indexer5.class, args = { int.class, int.class, int.class, int.class, int.class }) + public void testIndexer5() { + + // precondition test: if any dimension has a negative size + + ContractException contractException = assertThrows(ContractException.class, () -> new Indexer5(-1, 1, 1, 1, 1)); + assertEquals(IndexerError.NEGATIVE_DIMENSION_SIZE, contractException.getErrorType()); + + contractException = assertThrows(ContractException.class, () -> new Indexer5(1, -1, 1, 1, 1)); + assertEquals(IndexerError.NEGATIVE_DIMENSION_SIZE, contractException.getErrorType()); + + contractException = assertThrows(ContractException.class, () -> new Indexer5(1, 1, -1, 1, 1)); + assertEquals(IndexerError.NEGATIVE_DIMENSION_SIZE, contractException.getErrorType()); + + contractException = assertThrows(ContractException.class, () -> new Indexer5(1, 1, 1, -1, 1)); + assertEquals(IndexerError.NEGATIVE_DIMENSION_SIZE, contractException.getErrorType()); + + contractException = assertThrows(ContractException.class, () -> new Indexer5(1, 1, 1, 1, -1)); + assertEquals(IndexerError.NEGATIVE_DIMENSION_SIZE, contractException.getErrorType()); + + // precondition test: if the product of the dimensions exceeds max int + int n = (int) FastMath.pow(Integer.MAX_VALUE, 1.0 / 5) + 1; + + contractException = assertThrows(ContractException.class, () -> new Indexer5(n, n, n, n, n)); + assertEquals(IndexerError.EXCEEDS_MAX_ARRAY_SIZE, contractException.getErrorType()); + + } + + @Test + @UnitTestMethod(target = Indexer5.class, name = "index", args = { int.class, int.class, int.class, int.class, + int.class }) + public void testIndex() { + RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(6937151566492160140L); + + // show that index = (((index1*dim2 + // +index2)*dim3+index3)*dim4+index4)*dim5+index5 + + int n = 30; + + for (int i = 0; i < 30; i++) { + int dim1 = randomGenerator.nextInt(n) + 1; + int dim2 = randomGenerator.nextInt(n) + 1; + int dim3 = randomGenerator.nextInt(n) + 1; + int dim4 = randomGenerator.nextInt(n) + 1; + int dim5 = randomGenerator.nextInt(n) + 1; + + Indexer5 indexer5 = new Indexer5(dim1, dim2, dim3, dim4, dim5); + + for (int j = 0; j < 100; j++) { + + int index1 = randomGenerator.nextInt(dim1); + int index2 = randomGenerator.nextInt(dim2); + int index3 = randomGenerator.nextInt(dim3); + int index4 = randomGenerator.nextInt(dim4); + int index5 = randomGenerator.nextInt(dim5); + + int expectedIndex = (((index1 * dim2 + index2) * dim3 + index3) * dim4 + index4) * dim5 + index5; + int actualIndex = indexer5.index(index1, index2, index3, index4, index5); + + assertEquals(expectedIndex, actualIndex); + } + } + } + + @Test + @UnitTestMethod(target = Indexer5.class, name = "size", args = {}) + public void testSize() { + RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(1286993379829775736L); + + for (int i = 0; i < 30; i++) { + int dim1 = randomGenerator.nextInt(30) + 1; + int dim2 = randomGenerator.nextInt(30) + 1; + int dim3 = randomGenerator.nextInt(30) + 1; + int dim4 = randomGenerator.nextInt(30) + 1; + int dim5 = randomGenerator.nextInt(30) + 1; + + Indexer5 Indexer5 = new Indexer5(dim1, dim2, dim3, dim4, dim5); + + assertEquals(dim1 * dim2 * dim3 * dim4 * dim5, Indexer5.size()); + } + } +} diff --git a/src/test/java/util/indexer/AT_IndexerError.java b/src/test/java/util/indexer/AT_IndexerError.java new file mode 100644 index 0000000..f780f49 --- /dev/null +++ b/src/test/java/util/indexer/AT_IndexerError.java @@ -0,0 +1,36 @@ +package util.indexer; + +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.LinkedHashSet; +import java.util.Set; + +import org.junit.jupiter.api.Test; + +import util.annotations.UnitTestMethod; + + +public class AT_IndexerError { + + /** + * Tests {@link NucleusError#getDescription()} + */ + @Test + @UnitTestMethod(target = IndexerError.class, name = "getDescription", args = {}) + public void testGetDescription() { + // show that each ErrorType has a non-null, non-empty description + for (IndexerError nucleusError : IndexerError.values()) { + assertNotNull(nucleusError.getDescription()); + assertTrue(nucleusError.getDescription().length() > 0); + } + + // show that each description is unique (ignoring case as well) + Set descriptions = new LinkedHashSet<>(); + for (IndexerError nucleusError : IndexerError.values()) { + boolean isUnique = descriptions.add(nucleusError.getDescription().toLowerCase()); + assertTrue(isUnique, nucleusError + " duplicates the description of another member"); + } + } + +} From a2ac19cb9608a5a0a80840665e6b258ebcf3e9e5 Mon Sep 17 00:00:00 2001 From: bischoffz Date: Thu, 1 Feb 2024 15:18:42 -0500 Subject: [PATCH 04/30] move test resource helper --- .../resourcehelper/TestResourceHelper.java | 57 ++++++++++ .../resourcehelper/AT_TestResourceHelper.java | 104 ++++++++++++++++++ 2 files changed, 161 insertions(+) create mode 100644 src/main/java/util/resourcehelper/TestResourceHelper.java create mode 100644 src/test/java/util/resourcehelper/AT_TestResourceHelper.java diff --git a/src/main/java/util/resourcehelper/TestResourceHelper.java b/src/main/java/util/resourcehelper/TestResourceHelper.java new file mode 100644 index 0000000..b53494d --- /dev/null +++ b/src/main/java/util/resourcehelper/TestResourceHelper.java @@ -0,0 +1,57 @@ +package util.resourcehelper; + +import java.io.File; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.file.Path; + +public class TestResourceHelper { + + private TestResourceHelper() { + } + + public static Path getResourceDir(Class classRef) { + return Path.of(getURI(classRef.getClassLoader().getResource(""))); + } + + protected static URI getURI(URL url) { + try { + return url.toURI(); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + } + + public static Path makeOutputDir(Path dirPath) { + dirPath.toFile().mkdirs(); + + return dirPath; + } + + public static Path makeTestOutputDir(Path basepath, String subDir) { + Path dirPath = basepath.resolve(subDir); + + return makeOutputDir(dirPath); + } + + public static void createOutputFile(Path filePath, String fileName) { + + File isAfile = filePath.resolve(fileName).toFile(); + + if (isAfile.exists()) { + isAfile.delete(); + } + + createFile(isAfile); + } + + protected static void createFile(File file) { + try { + file.createNewFile(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/src/test/java/util/resourcehelper/AT_TestResourceHelper.java b/src/test/java/util/resourcehelper/AT_TestResourceHelper.java new file mode 100644 index 0000000..8c2e487 --- /dev/null +++ b/src/test/java/util/resourcehelper/AT_TestResourceHelper.java @@ -0,0 +1,104 @@ +package util.resourcehelper; + +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.file.Path; + +import org.junit.jupiter.api.Test; + +import util.annotations.UnitTestMethod; + +public class AT_TestResourceHelper { + + @Test + @UnitTestMethod(target = TestResourceHelper.class, name = "getResourceDir", args = { Class.class }) + public void testGetResourceDir() throws MalformedURLException { + Path path = TestResourceHelper.getResourceDir(this.getClass()); + + assertNotNull(path); + assertTrue(path.toFile().exists()); + + // preconditions + // bad url syntax + URL url = new URL("file:${my.properties}"); + + RuntimeException runtimeException = assertThrows(RuntimeException.class, () -> { + TestResourceHelper.getURI(url); + }); + + assertTrue(runtimeException.getCause() instanceof URISyntaxException); + } + + @Test + @UnitTestMethod(target = TestResourceHelper.class, name = "makeOutputDir", args = { Path.class }) + public void testMakeTestOutputDir() { + Path path = TestResourceHelper.getResourceDir(this.getClass()).resolve("additional-folder"); + + Path newPath = TestResourceHelper.makeOutputDir(path); + + assertNotNull(newPath); + assertTrue(newPath.toFile().exists()); + } + + @Test + @UnitTestMethod(target = TestResourceHelper.class, name = "makeOutputDir", args = { Path.class, String.class }) + public void testMakeTestOutputDir_SubDir() { + Path path = TestResourceHelper.getResourceDir(this.getClass()).resolve("additional-folder"); + + Path newPath = TestResourceHelper.makeTestOutputDir(path, "subFolder"); + + assertNotNull(newPath); + assertTrue(newPath.toFile().exists()); + } + + private class IOExceptionFile extends File { + + public IOExceptionFile(String pathname) { + super(pathname); + } + + public IOExceptionFile(File file) { + super(file, pathSeparator); + } + + @Override + public boolean createNewFile() throws IOException { + + throw new IOException(); + } + + } + + @Test + @UnitTestMethod(target = TestResourceHelper.class, name = "createOutputFile", args = { Path.class, + String.class }) + public void testCreateTestOutputFile() throws IOException { + Path path = TestResourceHelper.getResourceDir(this.getClass()); + + Path newPath = TestResourceHelper.makeOutputDir(path); + + String fileName = "foo.txt"; + TestResourceHelper.createOutputFile(newPath, fileName); + + assertTrue(newPath.resolve(fileName).toFile().exists()); + + // test for delete/recreat file if it exists + TestResourceHelper.createOutputFile(newPath, fileName); + + // preconditions + // force an IOException + RuntimeException runtimeException = assertThrows(RuntimeException.class, () -> { + IOExceptionFile testFile = new IOExceptionFile(newPath.resolve(fileName).toFile()); + TestResourceHelper.createFile(testFile); + }); + + assertTrue(runtimeException.getCause() instanceof IOException); + } +} From 69eacd17ab44306be5f0ab4365e78eb46e7e7ec0 Mon Sep 17 00:00:00 2001 From: bischoffz Date: Thu, 1 Feb 2024 15:22:53 -0500 Subject: [PATCH 05/30] update method name --- src/main/java/util/resourcehelper/TestResourceHelper.java | 2 +- src/test/java/util/resourcehelper/AT_TestResourceHelper.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/util/resourcehelper/TestResourceHelper.java b/src/main/java/util/resourcehelper/TestResourceHelper.java index b53494d..245f2b5 100644 --- a/src/main/java/util/resourcehelper/TestResourceHelper.java +++ b/src/main/java/util/resourcehelper/TestResourceHelper.java @@ -30,7 +30,7 @@ public static Path makeOutputDir(Path dirPath) { return dirPath; } - public static Path makeTestOutputDir(Path basepath, String subDir) { + public static Path makeOutputDir(Path basepath, String subDir) { Path dirPath = basepath.resolve(subDir); return makeOutputDir(dirPath); diff --git a/src/test/java/util/resourcehelper/AT_TestResourceHelper.java b/src/test/java/util/resourcehelper/AT_TestResourceHelper.java index 8c2e487..37d5d20 100644 --- a/src/test/java/util/resourcehelper/AT_TestResourceHelper.java +++ b/src/test/java/util/resourcehelper/AT_TestResourceHelper.java @@ -52,7 +52,7 @@ public void testMakeTestOutputDir() { public void testMakeTestOutputDir_SubDir() { Path path = TestResourceHelper.getResourceDir(this.getClass()).resolve("additional-folder"); - Path newPath = TestResourceHelper.makeTestOutputDir(path, "subFolder"); + Path newPath = TestResourceHelper.makeOutputDir(path, "subFolder"); assertNotNull(newPath); assertTrue(newPath.toFile().exists()); From c321609f75fcfe9ce6c862b980d68dd8ffdbd161 Mon Sep 17 00:00:00 2001 From: shawnhatch Date: Thu, 1 Feb 2024 18:46:54 -0500 Subject: [PATCH 06/30] Added default serialVersionUID to IOExceptionFile --- .../java/util/resourcehelper/AT_TestResourceHelper.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/java/util/resourcehelper/AT_TestResourceHelper.java b/src/test/java/util/resourcehelper/AT_TestResourceHelper.java index 37d5d20..c56a608 100644 --- a/src/test/java/util/resourcehelper/AT_TestResourceHelper.java +++ b/src/test/java/util/resourcehelper/AT_TestResourceHelper.java @@ -60,7 +60,12 @@ public void testMakeTestOutputDir_SubDir() { private class IOExceptionFile extends File { - public IOExceptionFile(String pathname) { + /** + * + */ + private static final long serialVersionUID = 1L; + + public IOExceptionFile(String pathname) { super(pathname); } From 02d068baab7039c506a8d05e533a68d81e26064c Mon Sep 17 00:00:00 2001 From: shawnhatch Date: Fri, 2 Feb 2024 08:44:20 -0500 Subject: [PATCH 07/30] Added tuple generator to ms-util --- .../util/combinatorics/TupleGenerator.java | 98 +++++++++++ .../util/combinatorics/AT_TupleGenerator.java | 156 ++++++++++++++++++ 2 files changed, 254 insertions(+) create mode 100644 src/main/java/util/combinatorics/TupleGenerator.java create mode 100644 src/test/java/util/combinatorics/AT_TupleGenerator.java diff --git a/src/main/java/util/combinatorics/TupleGenerator.java b/src/main/java/util/combinatorics/TupleGenerator.java new file mode 100644 index 0000000..476683a --- /dev/null +++ b/src/main/java/util/combinatorics/TupleGenerator.java @@ -0,0 +1,98 @@ +package util.combinatorics; + +import java.util.ArrayList; +import java.util.List; + +/** + * Utility class for generating tuples from a fixed set of finite ranges of the + * form [0,n). Uses a standard builder pattern for construction. + */ +public final class TupleGenerator { + private final int[] moduli; + private final int[] dimensions; + private final int size; + + private TupleGenerator(List dimensionSizes) { + dimensions = new int[dimensionSizes.size()]; + moduli = new int[dimensionSizes.size()]; + + int count = 1; + for (int i = 0; i < dimensionSizes.size(); i++) { + int dimSize = dimensionSizes.get(i); + dimensions[i] = dimSize; + moduli[i] = count; + count *= dimSize; + } + size = count; + } + + /** + * Returns the number of dimensions in this {@link TupleGenerator}. + */ + public int dimensions() { + return dimensions.length; + } + + /** + * Returns the number of tuples that can be generated by this {@link TupleGenerator} + */ + public int size() { + return size; + } + + /** + * Fills the given tuple with the values that correspond to the given index. + * + * @throws IndexOutOfBoundsException + *
    + *
  • if index < 0
  • + *
  • if index >= size()
  • + *
+ * @throws IllegalArgumentException + *
    + *
  • if the tuple is null
  • + *
  • if the tuple's length is not equal to + * dimensions()
  • + *
+ */ + public void fillTuple(int index, int[] tuple) { + if ((index < 0) || (index >= size)) { + throw new IndexOutOfBoundsException("index out of bounds"); + } + + if (tuple == null) { + throw new IllegalArgumentException("null array"); + } + + if (tuple.length != dimensions.length) { + throw new IllegalArgumentException("wrong number of dimensions"); + } + + for (int i = 0; i < dimensions.length; i++) { + tuple[i] = (index / moduli[i]) % dimensions[i]; + } + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List dimensionSizes = new ArrayList<>(); + + private Builder() { + } + + public TupleGenerator build() { + return new TupleGenerator(dimensionSizes); + } + + public Builder addDimension(int dimensionSize) { + if (dimensionSize <= 0) { + throw new IllegalArgumentException("Non positive dimension size"); + } + dimensionSizes.add(dimensionSize); + return this; + } + } +} diff --git a/src/test/java/util/combinatorics/AT_TupleGenerator.java b/src/test/java/util/combinatorics/AT_TupleGenerator.java new file mode 100644 index 0000000..09fb146 --- /dev/null +++ b/src/test/java/util/combinatorics/AT_TupleGenerator.java @@ -0,0 +1,156 @@ +package util.combinatorics; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.apache.commons.math3.random.RandomGenerator; +import org.junit.jupiter.api.Test; + +import util.annotations.UnitTestMethod; +import util.random.RandomGeneratorProvider; + +public class AT_TupleGenerator { + + /** + * Tests {@link TupleGenerator#size()} + */ + @Test + @UnitTestMethod(target = TupleGenerator.class, name = "size", args = {}) + public void testSize() { + + RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(7820715406750309229L); + for (int i = 0; i < 100; i++) { + TupleGenerator.Builder builder = TupleGenerator.builder(); + int dimensionCount = randomGenerator.nextInt(4) + 1; + int expectedSize = 1; + for (int j = 0; j < dimensionCount; j++) { + int dimSize = randomGenerator.nextInt(10) + 1; + expectedSize *= dimSize; + builder.addDimension(dimSize); + } + int actualSize = builder.build().size(); + assertEquals(expectedSize, actualSize); + } + } + + /** + * Tests {@link TupleGenerator#builder()} + */ + @Test + @UnitTestMethod(target = TupleGenerator.class, name = "builder", args = {}) + public void testBuilder() { + // covered by other tests + } + + /** + * Tests {@link TupleGenerator#dimensions()} + */ + @Test + @UnitTestMethod(target = TupleGenerator.class, name = "dimensions", args = {}) + public void testDimensions() { + + RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(7661626069466374878L); + for (int i = 0; i < 100; i++) { + TupleGenerator.Builder builder = TupleGenerator.builder(); + int dimensionCount = randomGenerator.nextInt(4) + 1; + for (int j = 0; j < dimensionCount; j++) { + int dimSize = randomGenerator.nextInt(10) + 1; + builder.addDimension(dimSize); + } + int actualDimensionCount = builder.build().dimensions(); + assertEquals(dimensionCount, actualDimensionCount); + } + } + + /** + * Tests {@link TupleGenerator#fillTuple(int, int[])} + */ + @Test + @UnitTestMethod(target = TupleGenerator.class, name = "fillTuple", args = { int.class, int[].class }) + public void testFillTuple() { + + TupleGenerator tupleGenerator = TupleGenerator.builder().addDimension(2).addDimension(3).addDimension(5).build(); + + int[] tuple = new int[tupleGenerator.dimensions()]; + + List expectedArrays = new ArrayList<>(); + + expectedArrays.add(new int[] { 0, 0, 0 }); + expectedArrays.add(new int[] { 1, 0, 0 }); + expectedArrays.add(new int[] { 0, 1, 0 }); + expectedArrays.add(new int[] { 1, 1, 0 }); + expectedArrays.add(new int[] { 0, 2, 0 }); + expectedArrays.add(new int[] { 1, 2, 0 }); + expectedArrays.add(new int[] { 0, 0, 1 }); + expectedArrays.add(new int[] { 1, 0, 1 }); + expectedArrays.add(new int[] { 0, 1, 1 }); + expectedArrays.add(new int[] { 1, 1, 1 }); + expectedArrays.add(new int[] { 0, 2, 1 }); + expectedArrays.add(new int[] { 1, 2, 1 }); + expectedArrays.add(new int[] { 0, 0, 2 }); + expectedArrays.add(new int[] { 1, 0, 2 }); + expectedArrays.add(new int[] { 0, 1, 2 }); + expectedArrays.add(new int[] { 1, 1, 2 }); + expectedArrays.add(new int[] { 0, 2, 2 }); + expectedArrays.add(new int[] { 1, 2, 2 }); + expectedArrays.add(new int[] { 0, 0, 3 }); + expectedArrays.add(new int[] { 1, 0, 3 }); + expectedArrays.add(new int[] { 0, 1, 3 }); + expectedArrays.add(new int[] { 1, 1, 3 }); + expectedArrays.add(new int[] { 0, 2, 3 }); + expectedArrays.add(new int[] { 1, 2, 3 }); + expectedArrays.add(new int[] { 0, 0, 4 }); + expectedArrays.add(new int[] { 1, 0, 4 }); + expectedArrays.add(new int[] { 0, 1, 4 }); + expectedArrays.add(new int[] { 1, 1, 4 }); + expectedArrays.add(new int[] { 0, 2, 4 }); + expectedArrays.add(new int[] { 1, 2, 4 }); + + for (int i = 0; i < tupleGenerator.size(); i++) { + tupleGenerator.fillTuple(i, tuple); + assertTrue(Arrays.equals(expectedArrays.get(i), tuple)); + } + /** + * precondition tests + */ + assertThrows(IndexOutOfBoundsException.class, () -> tupleGenerator.fillTuple(-2, tuple)); + assertThrows(IndexOutOfBoundsException.class, () -> tupleGenerator.fillTuple(-1, tuple)); + assertThrows(IndexOutOfBoundsException.class, () -> tupleGenerator.fillTuple(tupleGenerator.size(), tuple)); + assertThrows(IndexOutOfBoundsException.class, () -> tupleGenerator.fillTuple(tupleGenerator.size() + 1, tuple)); + assertThrows(IllegalArgumentException.class, () -> tupleGenerator.fillTuple(0, null)); + assertThrows(IllegalArgumentException.class, () -> tupleGenerator.fillTuple(0, new int[tupleGenerator.dimensions() - 1])); + assertThrows(IllegalArgumentException.class, () -> tupleGenerator.fillTuple(0, new int[tupleGenerator.dimensions() + 1])); + + } + + @Test + @UnitTestMethod(target = TupleGenerator.Builder.class, name = "build", args = {}) + public void testBuild() { + TupleGenerator.Builder builder = TupleGenerator.builder(); + TupleGenerator tupleGenerator = builder.build(); + + assertNotNull(tupleGenerator); + } + + @Test + @UnitTestMethod(target = TupleGenerator.Builder.class, name = "addDimension", args = { int.class }) + public void testAddDimension() { + RandomGenerator randomGenerator = RandomGeneratorProvider.getRandomGenerator(1967914502607382607L); + for (int i = 0; i < 100; i++) { + TupleGenerator.Builder builder = TupleGenerator.builder(); + int dimensionCount = randomGenerator.nextInt(4) + 1; + for (int j = 0; j < dimensionCount; j++) { + int dimSize = randomGenerator.nextInt(10) + 1; + builder.addDimension(dimSize); + } + int actualDimensionCount = builder.build().dimensions(); + assertEquals(dimensionCount, actualDimensionCount); + } + } +} From 16b7bdc7a6b0fea637e44e18fd8f89f9eb0635e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Feb 2024 20:47:28 -0500 Subject: [PATCH 08/30] Bump the standard-plugins group with 3 updates (#11) Bumps the standard-plugins group with 3 updates: [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire), [org.apache.maven.plugins:maven-source-plugin](https://github.com/apache/maven-source-plugin) and [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin). Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.0.0-M5 to 3.2.5 - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.0.0-M5...surefire-3.2.5) Updates `org.apache.maven.plugins:maven-source-plugin` from 3.2.1 to 3.3.0 - [Commits](https://github.com/apache/maven-source-plugin/compare/maven-source-plugin-3.2.1...maven-source-plugin-3.3.0) Updates `org.apache.maven.plugins:maven-javadoc-plugin` from 3.5.0 to 3.6.3 - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.5.0...maven-javadoc-plugin-3.6.3) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-minor dependency-group: standard-plugins - dependency-name: org.apache.maven.plugins:maven-source-plugin dependency-type: direct:production update-type: version-update:semver-minor dependency-group: standard-plugins - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-minor dependency-group: standard-plugins ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 083c861..9b37765 100644 --- a/pom.xml +++ b/pom.xml @@ -53,9 +53,9 @@ 17 - 3.0.0-M5 - 3.2.1 - 3.5.0 + 3.2.5 + 3.3.0 + 3.6.3 3.6.1 From 8171d755828f90c7b462cd0fae039ed26a088dae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Feb 2024 20:47:43 -0500 Subject: [PATCH 09/30] Bump the test-dependencies group with 3 updates (#12) Bumps the test-dependencies group with 3 updates: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5), [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5) and [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco). Updates `org.junit.jupiter:junit-jupiter-engine` from 5.8.2 to 5.10.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.8.2...r5.10.1) Updates `org.junit.jupiter:junit-jupiter-api` from 5.8.2 to 5.10.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.8.2...r5.10.1) Updates `org.jacoco:jacoco-maven-plugin` from 0.8.9 to 0.8.11 - [Release notes](https://github.com/jacoco/jacoco/releases) - [Commits](https://github.com/jacoco/jacoco/compare/v0.8.9...v0.8.11) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:production update-type: version-update:semver-minor dependency-group: test-dependencies - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-minor dependency-group: test-dependencies - dependency-name: org.jacoco:jacoco-maven-plugin dependency-type: direct:development update-type: version-update:semver-patch dependency-group: test-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 9b37765..a33c618 100644 --- a/pom.xml +++ b/pom.xml @@ -60,8 +60,8 @@ 3.6.1 1.0 - 5.8.2 - 0.8.9 + 5.10.1 + 0.8.11 From 424aaef902a3ac07280284ed3f7e46cf6ddaba75 Mon Sep 17 00:00:00 2001 From: Zachary Bischoff <116595361+bischoffz@users.noreply.github.com> Date: Sun, 4 Feb 2024 00:17:02 -0500 Subject: [PATCH 10/30] refactor package structure (#13) --- .../aspr/ms}/util/annotations/UnitTag.java | 2 +- .../util/annotations/UnitTestConstructor.java | 2 +- .../ms}/util/annotations/UnitTestField.java | 2 +- .../util/annotations/UnitTestForCoverage.java | 2 +- .../ms}/util/annotations/UnitTestMethod.java | 2 +- .../util/combinatorics/TupleGenerator.java | 2 +- .../ms}/util/delaunay/GeoDelaunaySolver.java | 10 ++++----- .../util/delaunay/PlanarDelaunaySolver.java | 10 ++++----- .../ms}/util/dimensiontree/DimensionTree.java | 4 ++-- .../dimensiontree/DimensionTreeError.java | 6 ++--- .../VolumetricDimensionTree.java | 2 +- .../hhs/aspr/ms}/util/earth/Earth.java | 4 ++-- .../hhs/aspr/ms}/util/earth/EarthGrid.java | 8 +++---- .../hhs/aspr/ms}/util/earth/LatLon.java | 2 +- .../hhs/aspr/ms}/util/earth/LatLonAlt.java | 4 ++-- .../aspr/ms}/util/errors/ContractError.java | 2 +- .../ms}/util/errors/ContractException.java | 2 +- .../aspr/ms}/util/geolocator/GeoLocator.java | 12 +++++----- .../hhs/aspr/ms}/util/graph/Graph.java | 2 +- .../ms}/util/graph/GraphDepthEvaluator.java | 2 +- .../hhs/aspr/ms}/util/graph/Graphs.java | 6 ++--- .../hhs/aspr/ms}/util/graph/MutableGraph.java | 2 +- .../hhs/aspr/ms}/util/indexer/Indexer2.java | 4 ++-- .../hhs/aspr/ms}/util/indexer/Indexer3.java | 4 ++-- .../hhs/aspr/ms}/util/indexer/Indexer4.java | 4 ++-- .../hhs/aspr/ms}/util/indexer/Indexer5.java | 4 ++-- .../aspr/ms}/util/indexer/IndexerError.java | 6 ++--- .../hhs/aspr/ms}/util/maps/MapReindexer.java | 2 +- .../classgraph/ClassGraphDriver.java | 12 +++++----- .../CircularClassDependencyReport.java | 14 ++++++------ .../CircularPackageDependencyReport.java | 14 ++++++------ .../classgraph/reports/WildCardReport.java | 8 +++---- .../support/ClassDependencyScan.java | 2 +- .../support/ClassDependencyScanner.java | 2 +- .../classgraph/support/JavaDependency.java | 2 +- .../classgraph/support/JavaRef.java | 2 +- .../dependency/DependencyGraph.java | 6 ++--- .../dependency/DependencyTracer.java | 2 +- .../util/meta/codecount/CodeCountReport.java | 4 ++-- .../PackageDependencyData.java | 8 +++---- .../PackageDependencyDataGenerator.java | 8 +++---- .../reports/PackageDependencyReport.java | 16 +++++++------- .../unittestcoverage/MetaInfoContainer.java | 14 ++++++------ .../unittestcoverage/MetaInfoGenerator.java | 18 +++++++-------- .../reports/IncompleteClassReport.java | 14 ++++++------ .../reports/MetaInfoReport.java | 22 +++++++++---------- .../reports/MissingTestsReport.java | 14 ++++++------ .../reports/StatusReport.java | 12 +++++----- .../warnings/ConstructorWarning.java | 2 +- .../warnings/FieldWarning.java | 2 +- .../warnings/MethodWarning.java | 2 +- .../warnings/WarningType.java | 2 +- .../aspr/ms}/util/path/ArrayPathSolver.java | 8 +++---- .../hhs/aspr/ms}/util/path/MapPathSolver.java | 10 ++++----- .../{ => gov/hhs/aspr/ms}/util/path/Path.java | 2 +- .../hhs/aspr/ms}/util/path/PathSolver.java | 2 +- .../hhs/aspr/ms}/util/path/Paths.java | 6 ++--- .../util/random/RandomGeneratorProvider.java | 2 +- .../resourcehelper/TestResourceHelper.java | 2 +- .../aspr/ms}/util/spherical/Chirality.java | 2 +- .../MalformedSphericalArcException.java | 2 +- .../MalformedSphericalPointException.java | 2 +- .../MalformedSphericalPolygonException.java | 2 +- .../MalformedSphericalTriangleException.java | 2 +- .../aspr/ms}/util/spherical/SphericalArc.java | 6 ++--- .../ms}/util/spherical/SphericalPoint.java | 6 ++--- .../ms}/util/spherical/SphericalPolygon.java | 6 ++--- .../ms}/util/spherical/SphericalTriangle.java | 6 ++--- .../hhs/aspr/ms}/util/stats/BinContainer.java | 2 +- .../aspr/ms}/util/stats/ImmutableStat.java | 2 +- .../hhs/aspr/ms}/util/stats/KahanSum.java | 2 +- .../hhs/aspr/ms}/util/stats/MutableStat.java | 2 +- .../hhs/aspr/ms}/util/stats/Stat.java | 2 +- .../hhs/aspr/ms}/util/time/Stopwatch.java | 2 +- .../hhs/aspr/ms}/util/time/TimeElapser.java | 2 +- .../hhs/aspr/ms}/util/vector/Circle2D.java | 4 ++-- .../aspr/ms}/util/vector/MutableVector2D.java | 4 ++-- .../aspr/ms}/util/vector/MutableVector3D.java | 2 +- .../util/vector/NonNormalVectorException.java | 2 +- .../hhs/aspr/ms}/util/vector/Vector2D.java | 4 ++-- .../hhs/aspr/ms}/util/vector/Vector3D.java | 2 +- .../hhs/aspr/ms}/util/wrappers/MultiKey.java | 2 +- .../ms}/util/wrappers/MutableBoolean.java | 2 +- .../aspr/ms}/util/wrappers/MutableDouble.java | 2 +- .../ms}/util/wrappers/MutableInteger.java | 2 +- .../aspr/ms}/util/wrappers/MutableLong.java | 2 +- .../aspr/ms}/util/wrappers/MutableObject.java | 2 +- .../aspr/ms}/tools/MetaInfoReportRunner.java | 4 ++-- .../util/combinatorics/AT_TupleGenerator.java | 6 ++--- .../util/delaunay/AT_GeoDelaunaySolver.java | 6 ++--- .../delaunay/AT_PlanarDelaunaySolver.java | 6 ++--- .../geovisualizer/GeoVisualizerDriver.java | 8 +++---- .../geovisualizer/GeoVisualizerPanel.java | 22 +++++++++---------- .../geovisualizer/GeoVisualzerFrame.java | 4 ++-- .../PlanarVisualizerDriver.java | 10 ++++----- .../PlanarVisualizerPanel.java | 6 ++--- .../PlanarVisualzerFrame.java | 4 ++-- .../util/dimensiontree/AT_DimensionTree.java | 10 ++++----- .../dimensiontree/AT_DimensionTreeError.java | 4 ++-- .../AT_VolumetricDimensionTree.java | 10 ++++----- .../hhs/aspr/ms}/util/earth/AT_Earth.java | 10 ++++----- .../hhs/aspr/ms}/util/earth/AT_EarthGrid.java | 12 +++++----- .../hhs/aspr/ms}/util/earth/AT_LatLon.java | 8 +++---- .../hhs/aspr/ms}/util/earth/AT_LatLonAlt.java | 10 ++++----- .../ms}/util/errors/AT_ContractException.java | 8 +++---- .../ms}/util/geolocator/AT_GeoLocator.java | 18 +++++++-------- .../hhs/aspr/ms}/util/graph/AT_Graph.java | 6 ++--- .../util/graph/AT_GraphDepthEvaluator.java | 4 ++-- .../hhs/aspr/ms}/util/graph/AT_Graphs.java | 8 +++---- .../aspr/ms}/util/graph/AT_MutableGraph.java | 6 ++--- .../aspr/ms}/util/indexer/AT_Indexer2.java | 10 ++++----- .../aspr/ms}/util/indexer/AT_Indexer3.java | 10 ++++----- .../aspr/ms}/util/indexer/AT_Indexer4.java | 10 ++++----- .../aspr/ms}/util/indexer/AT_Indexer5.java | 10 ++++----- .../ms}/util/indexer/AT_IndexerError.java | 4 ++-- .../ms}/util/path/AT_ArrayPathSolver.java | 14 ++++++------ .../aspr/ms}/util/path/AT_MapPathSolver.java | 14 ++++++------ .../hhs/aspr/ms}/util/path/AT_Path.java | 4 ++-- .../hhs/aspr/ms}/util/path/AT_Paths.java | 12 +++++----- .../random/AT_RandomGeneratorProvider.java | 4 ++-- .../resourcehelper/AT_TestResourceHelper.java | 4 ++-- .../AT_MalformedSphericalArcException.java | 4 ++-- .../AT_MalformedSphericalPointException.java | 4 ++-- ...AT_MalformedSphericalPolygonException.java | 4 ++-- ...T_MalformedSphericalTriangleException.java | 4 ++-- .../ms}/util/spherical/AT_SphericalArc.java | 10 ++++----- .../ms}/util/spherical/AT_SphericalPoint.java | 12 +++++----- .../util/spherical/AT_SphericalPolygon.java | 14 ++++++------ .../util/spherical/AT_SphericalTriangle.java | 10 ++++----- .../aspr/ms}/util/stats/AT_BinContainer.java | 12 +++++----- .../aspr/ms}/util/stats/AT_ImmutableStat.java | 6 ++--- .../hhs/aspr/ms}/util/stats/AT_KahanSum.java | 8 +++---- .../aspr/ms}/util/stats/AT_MutableStat.java | 8 +++---- .../hhs/aspr/ms}/util/time/AT_Stopwatch.java | 8 +++---- .../aspr/ms}/util/time/AT_TimeElapser.java | 6 ++--- .../hhs/aspr/ms}/util/vector/AT_Circle2D.java | 10 ++++----- .../ms}/util/vector/AT_MutableVector2D.java | 12 +++++----- .../ms}/util/vector/AT_MutableVector3D.java | 10 ++++----- .../vector/AT_NonNormalVectorException.java | 4 ++-- .../hhs/aspr/ms}/util/vector/AT_Vector2D.java | 12 +++++----- .../hhs/aspr/ms}/util/vector/AT_Vector3D.java | 10 ++++----- .../hhs/aspr/ms}/util/vector/MT_Circle2D.java | 8 +++---- .../aspr/ms}/util/wrappers/AT_MultiKey.java | 6 ++--- .../ms}/util/wrappers/AT_MutableBoolean.java | 8 +++---- .../ms}/util/wrappers/AT_MutableDouble.java | 8 +++---- .../ms}/util/wrappers/AT_MutableInteger.java | 8 +++---- .../ms}/util/wrappers/AT_MutableLong.java | 8 +++---- .../ms}/util/wrappers/MT_MutableObject.java | 8 +++---- 148 files changed, 467 insertions(+), 467 deletions(-) rename src/main/java/{ => gov/hhs/aspr/ms}/util/annotations/UnitTag.java (91%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/annotations/UnitTestConstructor.java (92%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/annotations/UnitTestField.java (91%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/annotations/UnitTestForCoverage.java (90%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/annotations/UnitTestMethod.java (92%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/combinatorics/TupleGenerator.java (98%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/delaunay/GeoDelaunaySolver.java (98%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/delaunay/PlanarDelaunaySolver.java (97%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/dimensiontree/DimensionTree.java (99%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/dimensiontree/DimensionTreeError.java (81%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/dimensiontree/VolumetricDimensionTree.java (99%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/earth/Earth.java (98%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/earth/EarthGrid.java (93%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/earth/LatLon.java (98%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/earth/LatLonAlt.java (98%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/errors/ContractError.java (86%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/errors/ContractException.java (97%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/geolocator/GeoLocator.java (96%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/graph/Graph.java (99%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/graph/GraphDepthEvaluator.java (98%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/graph/Graphs.java (98%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/graph/MutableGraph.java (99%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/indexer/Indexer2.java (94%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/indexer/Indexer3.java (94%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/indexer/Indexer4.java (95%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/indexer/Indexer5.java (95%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/indexer/IndexerError.java (77%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/maps/MapReindexer.java (93%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/classdependency/classgraph/ClassGraphDriver.java (51%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/classdependency/classgraph/reports/CircularClassDependencyReport.java (85%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/classdependency/classgraph/reports/CircularPackageDependencyReport.java (85%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/classdependency/classgraph/reports/WildCardReport.java (77%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/classdependency/classgraph/support/ClassDependencyScan.java (94%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/classdependency/classgraph/support/ClassDependencyScanner.java (97%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/classdependency/classgraph/support/JavaDependency.java (95%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/classdependency/classgraph/support/JavaRef.java (95%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/classdependency/dependency/DependencyGraph.java (89%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/classdependency/dependency/DependencyTracer.java (98%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/codecount/CodeCountReport.java (98%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/packagedependency/PackageDependencyData.java (96%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/packagedependency/PackageDependencyDataGenerator.java (96%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/packagedependency/reports/PackageDependencyReport.java (95%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/unittestcoverage/MetaInfoContainer.java (90%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/unittestcoverage/MetaInfoGenerator.java (95%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/unittestcoverage/reports/IncompleteClassReport.java (76%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/unittestcoverage/reports/MetaInfoReport.java (89%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/unittestcoverage/reports/MissingTestsReport.java (86%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/unittestcoverage/reports/StatusReport.java (75%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/unittestcoverage/warnings/ConstructorWarning.java (96%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/unittestcoverage/warnings/FieldWarning.java (96%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/unittestcoverage/warnings/MethodWarning.java (96%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/meta/unittestcoverage/warnings/WarningType.java (97%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/path/ArrayPathSolver.java (93%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/path/MapPathSolver.java (92%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/path/Path.java (98%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/path/PathSolver.java (85%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/path/Paths.java (98%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/random/RandomGeneratorProvider.java (88%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/resourcehelper/TestResourceHelper.java (96%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/spherical/Chirality.java (83%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/spherical/MalformedSphericalArcException.java (91%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/spherical/MalformedSphericalPointException.java (90%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/spherical/MalformedSphericalPolygonException.java (90%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/spherical/MalformedSphericalTriangleException.java (90%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/spherical/SphericalArc.java (97%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/spherical/SphericalPoint.java (92%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/spherical/SphericalPolygon.java (98%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/spherical/SphericalTriangle.java (97%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/stats/BinContainer.java (99%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/stats/ImmutableStat.java (99%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/stats/KahanSum.java (93%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/stats/MutableStat.java (99%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/stats/Stat.java (97%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/time/Stopwatch.java (97%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/time/TimeElapser.java (96%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/vector/Circle2D.java (99%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/vector/MutableVector2D.java (99%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/vector/MutableVector3D.java (99%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/vector/NonNormalVectorException.java (90%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/vector/Vector2D.java (99%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/vector/Vector3D.java (99%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/wrappers/MultiKey.java (98%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/wrappers/MutableBoolean.java (97%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/wrappers/MutableDouble.java (98%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/wrappers/MutableInteger.java (97%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/wrappers/MutableLong.java (97%) rename src/main/java/{ => gov/hhs/aspr/ms}/util/wrappers/MutableObject.java (97%) rename src/test/java/{ => gov/hhs/aspr/ms}/tools/MetaInfoReportRunner.java (51%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/combinatorics/AT_TupleGenerator.java (97%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/delaunay/AT_GeoDelaunaySolver.java (72%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/delaunay/AT_PlanarDelaunaySolver.java (72%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/delaunay/geovisualizer/GeoVisualizerDriver.java (90%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/delaunay/geovisualizer/GeoVisualizerPanel.java (97%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/delaunay/geovisualizer/GeoVisualzerFrame.java (88%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/delaunay/planarvisualizer/PlanarVisualizerDriver.java (81%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/delaunay/planarvisualizer/PlanarVisualizerPanel.java (98%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/delaunay/planarvisualizer/PlanarVisualzerFrame.java (88%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/dimensiontree/AT_DimensionTree.java (98%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/dimensiontree/AT_DimensionTreeError.java (90%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/dimensiontree/AT_VolumetricDimensionTree.java (98%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/earth/AT_Earth.java (98%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/earth/AT_EarthGrid.java (79%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/earth/AT_LatLon.java (96%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/earth/AT_LatLonAlt.java (97%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/errors/AT_ContractException.java (90%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/geolocator/AT_GeoLocator.java (94%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/graph/AT_Graph.java (99%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/graph/AT_GraphDepthEvaluator.java (98%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/graph/AT_Graphs.java (98%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/graph/AT_MutableGraph.java (99%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/indexer/AT_Indexer2.java (89%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/indexer/AT_Indexer3.java (90%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/indexer/AT_Indexer4.java (92%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/indexer/AT_Indexer5.java (93%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/indexer/AT_IndexerError.java (91%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/path/AT_ArrayPathSolver.java (93%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/path/AT_MapPathSolver.java (93%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/path/AT_Path.java (97%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/path/AT_Paths.java (94%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/random/AT_RandomGeneratorProvider.java (92%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/resourcehelper/AT_TestResourceHelper.java (97%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/spherical/AT_MalformedSphericalArcException.java (90%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/spherical/AT_MalformedSphericalPointException.java (91%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/spherical/AT_MalformedSphericalPolygonException.java (91%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/spherical/AT_MalformedSphericalTriangleException.java (91%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/spherical/AT_SphericalArc.java (98%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/spherical/AT_SphericalPoint.java (92%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/spherical/AT_SphericalPolygon.java (98%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/spherical/AT_SphericalTriangle.java (98%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/stats/AT_BinContainer.java (96%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/stats/AT_ImmutableStat.java (98%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/stats/AT_KahanSum.java (91%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/stats/AT_MutableStat.java (97%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/time/AT_Stopwatch.java (89%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/time/AT_TimeElapser.java (86%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/vector/AT_Circle2D.java (85%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/vector/AT_MutableVector2D.java (99%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/vector/AT_MutableVector3D.java (99%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/vector/AT_NonNormalVectorException.java (90%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/vector/AT_Vector2D.java (98%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/vector/AT_Vector3D.java (99%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/vector/MT_Circle2D.java (93%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/wrappers/AT_MultiKey.java (98%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/wrappers/AT_MutableBoolean.java (93%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/wrappers/AT_MutableDouble.java (96%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/wrappers/AT_MutableInteger.java (96%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/wrappers/AT_MutableLong.java (95%) rename src/test/java/{ => gov/hhs/aspr/ms}/util/wrappers/MT_MutableObject.java (94%) diff --git a/src/main/java/util/annotations/UnitTag.java b/src/main/java/gov/hhs/aspr/ms/util/annotations/UnitTag.java similarity index 91% rename from src/main/java/util/annotations/UnitTag.java rename to src/main/java/gov/hhs/aspr/ms/util/annotations/UnitTag.java index 07e78a8..4732418 100644 --- a/src/main/java/util/annotations/UnitTag.java +++ b/src/main/java/gov/hhs/aspr/ms/util/annotations/UnitTag.java @@ -1,4 +1,4 @@ -package util.annotations; +package gov.hhs.aspr.ms.util.annotations; public enum UnitTag { /* diff --git a/src/main/java/util/annotations/UnitTestConstructor.java b/src/main/java/gov/hhs/aspr/ms/util/annotations/UnitTestConstructor.java similarity index 92% rename from src/main/java/util/annotations/UnitTestConstructor.java rename to src/main/java/gov/hhs/aspr/ms/util/annotations/UnitTestConstructor.java index 78d0910..6cffa1c 100644 --- a/src/main/java/util/annotations/UnitTestConstructor.java +++ b/src/main/java/gov/hhs/aspr/ms/util/annotations/UnitTestConstructor.java @@ -1,4 +1,4 @@ -package util.annotations; +package gov.hhs.aspr.ms.util.annotations; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/src/main/java/util/annotations/UnitTestField.java b/src/main/java/gov/hhs/aspr/ms/util/annotations/UnitTestField.java similarity index 91% rename from src/main/java/util/annotations/UnitTestField.java rename to src/main/java/gov/hhs/aspr/ms/util/annotations/UnitTestField.java index 4b18a3d..58fc169 100644 --- a/src/main/java/util/annotations/UnitTestField.java +++ b/src/main/java/gov/hhs/aspr/ms/util/annotations/UnitTestField.java @@ -1,4 +1,4 @@ -package util.annotations; +package gov.hhs.aspr.ms.util.annotations; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/src/main/java/util/annotations/UnitTestForCoverage.java b/src/main/java/gov/hhs/aspr/ms/util/annotations/UnitTestForCoverage.java similarity index 90% rename from src/main/java/util/annotations/UnitTestForCoverage.java rename to src/main/java/gov/hhs/aspr/ms/util/annotations/UnitTestForCoverage.java index 0121199..513b54d 100644 --- a/src/main/java/util/annotations/UnitTestForCoverage.java +++ b/src/main/java/gov/hhs/aspr/ms/util/annotations/UnitTestForCoverage.java @@ -1,4 +1,4 @@ -package util.annotations; +package gov.hhs.aspr.ms.util.annotations; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/src/main/java/util/annotations/UnitTestMethod.java b/src/main/java/gov/hhs/aspr/ms/util/annotations/UnitTestMethod.java similarity index 92% rename from src/main/java/util/annotations/UnitTestMethod.java rename to src/main/java/gov/hhs/aspr/ms/util/annotations/UnitTestMethod.java index da73e29..10f335c 100644 --- a/src/main/java/util/annotations/UnitTestMethod.java +++ b/src/main/java/gov/hhs/aspr/ms/util/annotations/UnitTestMethod.java @@ -1,4 +1,4 @@ -package util.annotations; +package gov.hhs.aspr.ms.util.annotations; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/src/main/java/util/combinatorics/TupleGenerator.java b/src/main/java/gov/hhs/aspr/ms/util/combinatorics/TupleGenerator.java similarity index 98% rename from src/main/java/util/combinatorics/TupleGenerator.java rename to src/main/java/gov/hhs/aspr/ms/util/combinatorics/TupleGenerator.java index 476683a..8e9b38a 100644 --- a/src/main/java/util/combinatorics/TupleGenerator.java +++ b/src/main/java/gov/hhs/aspr/ms/util/combinatorics/TupleGenerator.java @@ -1,4 +1,4 @@ -package util.combinatorics; +package gov.hhs.aspr.ms.util.combinatorics; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/util/delaunay/GeoDelaunaySolver.java b/src/main/java/gov/hhs/aspr/ms/util/delaunay/GeoDelaunaySolver.java similarity index 98% rename from src/main/java/util/delaunay/GeoDelaunaySolver.java rename to src/main/java/gov/hhs/aspr/ms/util/delaunay/GeoDelaunaySolver.java index 89645f3..2906ace 100644 --- a/src/main/java/util/delaunay/GeoDelaunaySolver.java +++ b/src/main/java/gov/hhs/aspr/ms/util/delaunay/GeoDelaunaySolver.java @@ -1,4 +1,4 @@ -package util.delaunay; +package gov.hhs.aspr.ms.util.delaunay; import java.util.ArrayList; import java.util.Arrays; @@ -10,10 +10,10 @@ import org.apache.commons.math3.util.FastMath; import org.apache.commons.math3.util.Pair; -import util.dimensiontree.VolumetricDimensionTree; -import util.earth.LatLon; -import util.vector.MutableVector3D; -import util.vector.Vector3D; +import gov.hhs.aspr.ms.util.dimensiontree.VolumetricDimensionTree; +import gov.hhs.aspr.ms.util.earth.LatLon; +import gov.hhs.aspr.ms.util.vector.MutableVector3D; +import gov.hhs.aspr.ms.util.vector.Vector3D; public class GeoDelaunaySolver { diff --git a/src/main/java/util/delaunay/PlanarDelaunaySolver.java b/src/main/java/gov/hhs/aspr/ms/util/delaunay/PlanarDelaunaySolver.java similarity index 97% rename from src/main/java/util/delaunay/PlanarDelaunaySolver.java rename to src/main/java/gov/hhs/aspr/ms/util/delaunay/PlanarDelaunaySolver.java index 980b936..1f8181d 100644 --- a/src/main/java/util/delaunay/PlanarDelaunaySolver.java +++ b/src/main/java/gov/hhs/aspr/ms/util/delaunay/PlanarDelaunaySolver.java @@ -1,4 +1,4 @@ -package util.delaunay; +package gov.hhs.aspr.ms.util.delaunay; import java.util.ArrayList; import java.util.Arrays; @@ -10,10 +10,10 @@ import org.apache.commons.math3.util.FastMath; import org.apache.commons.math3.util.Pair; -import util.dimensiontree.VolumetricDimensionTree; -import util.spherical.Chirality; -import util.vector.MutableVector2D; -import util.vector.Vector2D; +import gov.hhs.aspr.ms.util.dimensiontree.VolumetricDimensionTree; +import gov.hhs.aspr.ms.util.spherical.Chirality; +import gov.hhs.aspr.ms.util.vector.MutableVector2D; +import gov.hhs.aspr.ms.util.vector.Vector2D; public class PlanarDelaunaySolver { diff --git a/src/main/java/util/dimensiontree/DimensionTree.java b/src/main/java/gov/hhs/aspr/ms/util/dimensiontree/DimensionTree.java similarity index 99% rename from src/main/java/util/dimensiontree/DimensionTree.java rename to src/main/java/gov/hhs/aspr/ms/util/dimensiontree/DimensionTree.java index b31203c..b6b3c22 100644 --- a/src/main/java/util/dimensiontree/DimensionTree.java +++ b/src/main/java/gov/hhs/aspr/ms/util/dimensiontree/DimensionTree.java @@ -1,4 +1,4 @@ -package util.dimensiontree; +package gov.hhs.aspr.ms.util.dimensiontree; import java.util.ArrayList; import java.util.Arrays; @@ -9,7 +9,7 @@ import org.apache.commons.math3.util.FastMath; -import util.errors.ContractException; +import gov.hhs.aspr.ms.util.errors.ContractException; /** *

diff --git a/src/main/java/util/dimensiontree/DimensionTreeError.java b/src/main/java/gov/hhs/aspr/ms/util/dimensiontree/DimensionTreeError.java similarity index 81% rename from src/main/java/util/dimensiontree/DimensionTreeError.java rename to src/main/java/gov/hhs/aspr/ms/util/dimensiontree/DimensionTreeError.java index 0563f00..1827780 100644 --- a/src/main/java/util/dimensiontree/DimensionTreeError.java +++ b/src/main/java/gov/hhs/aspr/ms/util/dimensiontree/DimensionTreeError.java @@ -1,7 +1,7 @@ -package util.dimensiontree; +package gov.hhs.aspr.ms.util.dimensiontree; -import util.errors.ContractError; -import util.errors.ContractException; +import gov.hhs.aspr.ms.util.errors.ContractError; +import gov.hhs.aspr.ms.util.errors.ContractException; /** * An enumeration supporting {@link ContractException} that acts as a general diff --git a/src/main/java/util/dimensiontree/VolumetricDimensionTree.java b/src/main/java/gov/hhs/aspr/ms/util/dimensiontree/VolumetricDimensionTree.java similarity index 99% rename from src/main/java/util/dimensiontree/VolumetricDimensionTree.java rename to src/main/java/gov/hhs/aspr/ms/util/dimensiontree/VolumetricDimensionTree.java index 9b23706..333b8e6 100644 --- a/src/main/java/util/dimensiontree/VolumetricDimensionTree.java +++ b/src/main/java/gov/hhs/aspr/ms/util/dimensiontree/VolumetricDimensionTree.java @@ -1,4 +1,4 @@ -package util.dimensiontree; +package gov.hhs.aspr.ms.util.dimensiontree; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/util/earth/Earth.java b/src/main/java/gov/hhs/aspr/ms/util/earth/Earth.java similarity index 98% rename from src/main/java/util/earth/Earth.java rename to src/main/java/gov/hhs/aspr/ms/util/earth/Earth.java index 5f5fc43..72ed877 100644 --- a/src/main/java/util/earth/Earth.java +++ b/src/main/java/gov/hhs/aspr/ms/util/earth/Earth.java @@ -1,8 +1,8 @@ -package util.earth; +package gov.hhs.aspr.ms.util.earth; import org.apache.commons.math3.util.FastMath; -import util.vector.Vector3D; +import gov.hhs.aspr.ms.util.vector.Vector3D; /** * A spherical geo-model for converting various coordinate representations and diff --git a/src/main/java/util/earth/EarthGrid.java b/src/main/java/gov/hhs/aspr/ms/util/earth/EarthGrid.java similarity index 93% rename from src/main/java/util/earth/EarthGrid.java rename to src/main/java/gov/hhs/aspr/ms/util/earth/EarthGrid.java index d6b60c5..16fdef7 100644 --- a/src/main/java/util/earth/EarthGrid.java +++ b/src/main/java/gov/hhs/aspr/ms/util/earth/EarthGrid.java @@ -1,10 +1,10 @@ -package util.earth; +package gov.hhs.aspr.ms.util.earth; import org.apache.commons.math3.util.FastMath; -import util.vector.MutableVector3D; -import util.vector.Vector2D; -import util.vector.Vector3D; +import gov.hhs.aspr.ms.util.vector.MutableVector3D; +import gov.hhs.aspr.ms.util.vector.Vector2D; +import gov.hhs.aspr.ms.util.vector.Vector3D; /** * A utility class for converting (x,y) two dimensional grid coordinates to and diff --git a/src/main/java/util/earth/LatLon.java b/src/main/java/gov/hhs/aspr/ms/util/earth/LatLon.java similarity index 98% rename from src/main/java/util/earth/LatLon.java rename to src/main/java/gov/hhs/aspr/ms/util/earth/LatLon.java index f010123..8a921f1 100644 --- a/src/main/java/util/earth/LatLon.java +++ b/src/main/java/gov/hhs/aspr/ms/util/earth/LatLon.java @@ -1,4 +1,4 @@ -package util.earth; +package gov.hhs.aspr.ms.util.earth; import net.jcip.annotations.Immutable; diff --git a/src/main/java/util/earth/LatLonAlt.java b/src/main/java/gov/hhs/aspr/ms/util/earth/LatLonAlt.java similarity index 98% rename from src/main/java/util/earth/LatLonAlt.java rename to src/main/java/gov/hhs/aspr/ms/util/earth/LatLonAlt.java index 13243ce..8b30cc5 100644 --- a/src/main/java/util/earth/LatLonAlt.java +++ b/src/main/java/gov/hhs/aspr/ms/util/earth/LatLonAlt.java @@ -1,6 +1,6 @@ -package util.earth; +package gov.hhs.aspr.ms.util.earth; -import util.vector.Vector3D; +import gov.hhs.aspr.ms.util.vector.Vector3D; public class LatLonAlt { diff --git a/src/main/java/util/errors/ContractError.java b/src/main/java/gov/hhs/aspr/ms/util/errors/ContractError.java similarity index 86% rename from src/main/java/util/errors/ContractError.java rename to src/main/java/gov/hhs/aspr/ms/util/errors/ContractError.java index 9a3f81d..e9a773e 100644 --- a/src/main/java/util/errors/ContractError.java +++ b/src/main/java/gov/hhs/aspr/ms/util/errors/ContractError.java @@ -1,5 +1,5 @@ -package util.errors; +package gov.hhs.aspr.ms.util.errors; /** * Marker interface for the descriptions of runtime exceptions where the source diff --git a/src/main/java/util/errors/ContractException.java b/src/main/java/gov/hhs/aspr/ms/util/errors/ContractException.java similarity index 97% rename from src/main/java/util/errors/ContractException.java rename to src/main/java/gov/hhs/aspr/ms/util/errors/ContractException.java index fa98fd3..f93a3e9 100644 --- a/src/main/java/util/errors/ContractException.java +++ b/src/main/java/gov/hhs/aspr/ms/util/errors/ContractException.java @@ -1,4 +1,4 @@ -package util.errors; +package gov.hhs.aspr.ms.util.errors; /** * A {@link RuntimeException} that indicates that the cause of the error as a diff --git a/src/main/java/util/geolocator/GeoLocator.java b/src/main/java/gov/hhs/aspr/ms/util/geolocator/GeoLocator.java similarity index 96% rename from src/main/java/util/geolocator/GeoLocator.java rename to src/main/java/gov/hhs/aspr/ms/util/geolocator/GeoLocator.java index 5768131..8f74c72 100644 --- a/src/main/java/util/geolocator/GeoLocator.java +++ b/src/main/java/gov/hhs/aspr/ms/util/geolocator/GeoLocator.java @@ -1,4 +1,4 @@ -package util.geolocator; +package gov.hhs.aspr.ms.util.geolocator; import java.util.ArrayList; import java.util.Comparator; @@ -9,11 +9,11 @@ import org.apache.commons.math3.util.FastMath; import org.apache.commons.math3.util.Pair; -import util.dimensiontree.DimensionTree; -import util.earth.Earth; -import util.earth.LatLonAlt; -import util.vector.Vector2D; -import util.vector.Vector3D; +import gov.hhs.aspr.ms.util.dimensiontree.DimensionTree; +import gov.hhs.aspr.ms.util.earth.Earth; +import gov.hhs.aspr.ms.util.earth.LatLonAlt; +import gov.hhs.aspr.ms.util.vector.Vector2D; +import gov.hhs.aspr.ms.util.vector.Vector3D; /** * A generics-based utility class for managing point locations on a spherical diff --git a/src/main/java/util/graph/Graph.java b/src/main/java/gov/hhs/aspr/ms/util/graph/Graph.java similarity index 99% rename from src/main/java/util/graph/Graph.java rename to src/main/java/gov/hhs/aspr/ms/util/graph/Graph.java index d05daa7..edc59d9 100644 --- a/src/main/java/util/graph/Graph.java +++ b/src/main/java/gov/hhs/aspr/ms/util/graph/Graph.java @@ -1,4 +1,4 @@ -package util.graph; +package gov.hhs.aspr.ms.util.graph; import java.util.List; diff --git a/src/main/java/util/graph/GraphDepthEvaluator.java b/src/main/java/gov/hhs/aspr/ms/util/graph/GraphDepthEvaluator.java similarity index 98% rename from src/main/java/util/graph/GraphDepthEvaluator.java rename to src/main/java/gov/hhs/aspr/ms/util/graph/GraphDepthEvaluator.java index 58cd4fd..292e56c 100644 --- a/src/main/java/util/graph/GraphDepthEvaluator.java +++ b/src/main/java/gov/hhs/aspr/ms/util/graph/GraphDepthEvaluator.java @@ -1,4 +1,4 @@ -package util.graph; +package gov.hhs.aspr.ms.util.graph; import java.util.ArrayList; import java.util.LinkedHashMap; diff --git a/src/main/java/util/graph/Graphs.java b/src/main/java/gov/hhs/aspr/ms/util/graph/Graphs.java similarity index 98% rename from src/main/java/util/graph/Graphs.java rename to src/main/java/gov/hhs/aspr/ms/util/graph/Graphs.java index fa98005..f495e59 100644 --- a/src/main/java/util/graph/Graphs.java +++ b/src/main/java/gov/hhs/aspr/ms/util/graph/Graphs.java @@ -1,4 +1,4 @@ -package util.graph; +package gov.hhs.aspr.ms.util.graph; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -9,8 +9,8 @@ import java.util.Optional; import java.util.Set; -import util.path.Path; -import util.path.Paths; +import gov.hhs.aspr.ms.util.path.Path; +import gov.hhs.aspr.ms.util.path.Paths; public final class Graphs { diff --git a/src/main/java/util/graph/MutableGraph.java b/src/main/java/gov/hhs/aspr/ms/util/graph/MutableGraph.java similarity index 99% rename from src/main/java/util/graph/MutableGraph.java rename to src/main/java/gov/hhs/aspr/ms/util/graph/MutableGraph.java index 2210d0e..62d9090 100644 --- a/src/main/java/util/graph/MutableGraph.java +++ b/src/main/java/gov/hhs/aspr/ms/util/graph/MutableGraph.java @@ -1,4 +1,4 @@ -package util.graph; +package gov.hhs.aspr.ms.util.graph; import java.util.ArrayList; import java.util.LinkedHashMap; diff --git a/src/main/java/util/indexer/Indexer2.java b/src/main/java/gov/hhs/aspr/ms/util/indexer/Indexer2.java similarity index 94% rename from src/main/java/util/indexer/Indexer2.java rename to src/main/java/gov/hhs/aspr/ms/util/indexer/Indexer2.java index 11e1413..f286f07 100644 --- a/src/main/java/util/indexer/Indexer2.java +++ b/src/main/java/gov/hhs/aspr/ms/util/indexer/Indexer2.java @@ -1,7 +1,7 @@ -package util.indexer; +package gov.hhs.aspr.ms.util.indexer; +import gov.hhs.aspr.ms.util.errors.ContractException; import net.jcip.annotations.ThreadSafe; -import util.errors.ContractException; /** * A thread safe, immutable index converter that supports treating a 2D array as diff --git a/src/main/java/util/indexer/Indexer3.java b/src/main/java/gov/hhs/aspr/ms/util/indexer/Indexer3.java similarity index 94% rename from src/main/java/util/indexer/Indexer3.java rename to src/main/java/gov/hhs/aspr/ms/util/indexer/Indexer3.java index e86dd76..e78a16a 100644 --- a/src/main/java/util/indexer/Indexer3.java +++ b/src/main/java/gov/hhs/aspr/ms/util/indexer/Indexer3.java @@ -1,6 +1,6 @@ -package util.indexer; +package gov.hhs.aspr.ms.util.indexer; -import util.errors.ContractException; +import gov.hhs.aspr.ms.util.errors.ContractException; /** * A thread safe, immutable index converter that supports treating a 3D array as diff --git a/src/main/java/util/indexer/Indexer4.java b/src/main/java/gov/hhs/aspr/ms/util/indexer/Indexer4.java similarity index 95% rename from src/main/java/util/indexer/Indexer4.java rename to src/main/java/gov/hhs/aspr/ms/util/indexer/Indexer4.java index bbe3641..fa76a89 100644 --- a/src/main/java/util/indexer/Indexer4.java +++ b/src/main/java/gov/hhs/aspr/ms/util/indexer/Indexer4.java @@ -1,6 +1,6 @@ -package util.indexer; +package gov.hhs.aspr.ms.util.indexer; -import util.errors.ContractException; +import gov.hhs.aspr.ms.util.errors.ContractException; /** * A thread safe, immutable index converter that supports treating a 4D array as diff --git a/src/main/java/util/indexer/Indexer5.java b/src/main/java/gov/hhs/aspr/ms/util/indexer/Indexer5.java similarity index 95% rename from src/main/java/util/indexer/Indexer5.java rename to src/main/java/gov/hhs/aspr/ms/util/indexer/Indexer5.java index ad26f32..b66736a 100644 --- a/src/main/java/util/indexer/Indexer5.java +++ b/src/main/java/gov/hhs/aspr/ms/util/indexer/Indexer5.java @@ -1,6 +1,6 @@ -package util.indexer; +package gov.hhs.aspr.ms.util.indexer; -import util.errors.ContractException; +import gov.hhs.aspr.ms.util.errors.ContractException; /** * A thread safe, immutable index converter that supports treating a 5D array as diff --git a/src/main/java/util/indexer/IndexerError.java b/src/main/java/gov/hhs/aspr/ms/util/indexer/IndexerError.java similarity index 77% rename from src/main/java/util/indexer/IndexerError.java rename to src/main/java/gov/hhs/aspr/ms/util/indexer/IndexerError.java index 407264a..ba91b83 100644 --- a/src/main/java/util/indexer/IndexerError.java +++ b/src/main/java/gov/hhs/aspr/ms/util/indexer/IndexerError.java @@ -1,7 +1,7 @@ -package util.indexer; +package gov.hhs.aspr.ms.util.indexer; -import util.errors.ContractError; -import util.errors.ContractException; +import gov.hhs.aspr.ms.util.errors.ContractError; +import gov.hhs.aspr.ms.util.errors.ContractException; /** * An enumeration supporting {@link ContractException} that acts as a general diff --git a/src/main/java/util/maps/MapReindexer.java b/src/main/java/gov/hhs/aspr/ms/util/maps/MapReindexer.java similarity index 93% rename from src/main/java/util/maps/MapReindexer.java rename to src/main/java/gov/hhs/aspr/ms/util/maps/MapReindexer.java index 7332bee..1356eb5 100644 --- a/src/main/java/util/maps/MapReindexer.java +++ b/src/main/java/gov/hhs/aspr/ms/util/maps/MapReindexer.java @@ -1,4 +1,4 @@ -package util.maps; +package gov.hhs.aspr.ms.util.maps; import java.util.LinkedHashMap; import java.util.Map; diff --git a/src/main/java/util/meta/classdependency/classgraph/ClassGraphDriver.java b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/ClassGraphDriver.java similarity index 51% rename from src/main/java/util/meta/classdependency/classgraph/ClassGraphDriver.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/ClassGraphDriver.java index b3d1d43..16899b2 100644 --- a/src/main/java/util/meta/classdependency/classgraph/ClassGraphDriver.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/ClassGraphDriver.java @@ -1,14 +1,14 @@ -package util.meta.classdependency.classgraph; +package gov.hhs.aspr.ms.util.meta.classdependency.classgraph; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; -import util.meta.classdependency.classgraph.reports.CircularClassDependencyReport; -import util.meta.classdependency.classgraph.reports.CircularPackageDependencyReport; -import util.meta.classdependency.classgraph.reports.WildCardReport; -import util.meta.classdependency.classgraph.support.ClassDependencyScan; -import util.meta.classdependency.classgraph.support.ClassDependencyScanner; +import gov.hhs.aspr.ms.util.meta.classdependency.classgraph.reports.CircularClassDependencyReport; +import gov.hhs.aspr.ms.util.meta.classdependency.classgraph.reports.CircularPackageDependencyReport; +import gov.hhs.aspr.ms.util.meta.classdependency.classgraph.reports.WildCardReport; +import gov.hhs.aspr.ms.util.meta.classdependency.classgraph.support.ClassDependencyScan; +import gov.hhs.aspr.ms.util.meta.classdependency.classgraph.support.ClassDependencyScanner; public final class ClassGraphDriver { diff --git a/src/main/java/util/meta/classdependency/classgraph/reports/CircularClassDependencyReport.java b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/reports/CircularClassDependencyReport.java similarity index 85% rename from src/main/java/util/meta/classdependency/classgraph/reports/CircularClassDependencyReport.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/reports/CircularClassDependencyReport.java index 8f8cbc1..4ee8ab1 100644 --- a/src/main/java/util/meta/classdependency/classgraph/reports/CircularClassDependencyReport.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/reports/CircularClassDependencyReport.java @@ -1,4 +1,4 @@ -package util.meta.classdependency.classgraph.reports; +package gov.hhs.aspr.ms.util.meta.classdependency.classgraph.reports; import java.util.LinkedHashSet; import java.util.List; @@ -6,12 +6,12 @@ import java.util.Set; import java.util.stream.Collectors; -import util.graph.Graph; -import util.graph.GraphDepthEvaluator; -import util.graph.Graphs; -import util.graph.MutableGraph; -import util.meta.classdependency.classgraph.support.ClassDependencyScan; -import util.meta.classdependency.classgraph.support.JavaDependency; +import gov.hhs.aspr.ms.util.graph.Graph; +import gov.hhs.aspr.ms.util.graph.GraphDepthEvaluator; +import gov.hhs.aspr.ms.util.graph.Graphs; +import gov.hhs.aspr.ms.util.graph.MutableGraph; +import gov.hhs.aspr.ms.util.meta.classdependency.classgraph.support.ClassDependencyScan; +import gov.hhs.aspr.ms.util.meta.classdependency.classgraph.support.JavaDependency; public final class CircularClassDependencyReport { private CircularClassDependencyReport() { diff --git a/src/main/java/util/meta/classdependency/classgraph/reports/CircularPackageDependencyReport.java b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/reports/CircularPackageDependencyReport.java similarity index 85% rename from src/main/java/util/meta/classdependency/classgraph/reports/CircularPackageDependencyReport.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/reports/CircularPackageDependencyReport.java index 7db2b93..b82598a 100644 --- a/src/main/java/util/meta/classdependency/classgraph/reports/CircularPackageDependencyReport.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/reports/CircularPackageDependencyReport.java @@ -1,4 +1,4 @@ -package util.meta.classdependency.classgraph.reports; +package gov.hhs.aspr.ms.util.meta.classdependency.classgraph.reports; import java.util.LinkedHashSet; import java.util.List; @@ -6,12 +6,12 @@ import java.util.Set; import java.util.stream.Collectors; -import util.graph.Graph; -import util.graph.GraphDepthEvaluator; -import util.graph.Graphs; -import util.graph.MutableGraph; -import util.meta.classdependency.classgraph.support.ClassDependencyScan; -import util.meta.classdependency.classgraph.support.JavaDependency; +import gov.hhs.aspr.ms.util.graph.Graph; +import gov.hhs.aspr.ms.util.graph.GraphDepthEvaluator; +import gov.hhs.aspr.ms.util.graph.Graphs; +import gov.hhs.aspr.ms.util.graph.MutableGraph; +import gov.hhs.aspr.ms.util.meta.classdependency.classgraph.support.ClassDependencyScan; +import gov.hhs.aspr.ms.util.meta.classdependency.classgraph.support.JavaDependency; public final class CircularPackageDependencyReport { private CircularPackageDependencyReport() { diff --git a/src/main/java/util/meta/classdependency/classgraph/reports/WildCardReport.java b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/reports/WildCardReport.java similarity index 77% rename from src/main/java/util/meta/classdependency/classgraph/reports/WildCardReport.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/reports/WildCardReport.java index 449df01..2780d3b 100644 --- a/src/main/java/util/meta/classdependency/classgraph/reports/WildCardReport.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/reports/WildCardReport.java @@ -1,13 +1,13 @@ -package util.meta.classdependency.classgraph.reports; +package gov.hhs.aspr.ms.util.meta.classdependency.classgraph.reports; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import util.meta.classdependency.classgraph.support.ClassDependencyScan; -import util.meta.classdependency.classgraph.support.JavaDependency; -import util.meta.classdependency.classgraph.support.JavaRef; +import gov.hhs.aspr.ms.util.meta.classdependency.classgraph.support.ClassDependencyScan; +import gov.hhs.aspr.ms.util.meta.classdependency.classgraph.support.JavaDependency; +import gov.hhs.aspr.ms.util.meta.classdependency.classgraph.support.JavaRef; public final class WildCardReport { private WildCardReport() { diff --git a/src/main/java/util/meta/classdependency/classgraph/support/ClassDependencyScan.java b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/support/ClassDependencyScan.java similarity index 94% rename from src/main/java/util/meta/classdependency/classgraph/support/ClassDependencyScan.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/support/ClassDependencyScan.java index bf9ed3a..ed41f66 100644 --- a/src/main/java/util/meta/classdependency/classgraph/support/ClassDependencyScan.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/support/ClassDependencyScan.java @@ -1,4 +1,4 @@ -package util.meta.classdependency.classgraph.support; +package gov.hhs.aspr.ms.util.meta.classdependency.classgraph.support; import java.util.LinkedHashSet; import java.util.Set; diff --git a/src/main/java/util/meta/classdependency/classgraph/support/ClassDependencyScanner.java b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/support/ClassDependencyScanner.java similarity index 97% rename from src/main/java/util/meta/classdependency/classgraph/support/ClassDependencyScanner.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/support/ClassDependencyScanner.java index 0d5b89c..cb13c17 100644 --- a/src/main/java/util/meta/classdependency/classgraph/support/ClassDependencyScanner.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/support/ClassDependencyScanner.java @@ -1,4 +1,4 @@ -package util.meta.classdependency.classgraph.support; +package gov.hhs.aspr.ms.util.meta.classdependency.classgraph.support; import java.io.IOException; import java.nio.file.FileVisitResult; diff --git a/src/main/java/util/meta/classdependency/classgraph/support/JavaDependency.java b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/support/JavaDependency.java similarity index 95% rename from src/main/java/util/meta/classdependency/classgraph/support/JavaDependency.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/support/JavaDependency.java index 4f47d85..0fee9ab 100644 --- a/src/main/java/util/meta/classdependency/classgraph/support/JavaDependency.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/support/JavaDependency.java @@ -1,4 +1,4 @@ -package util.meta.classdependency.classgraph.support; +package gov.hhs.aspr.ms.util.meta.classdependency.classgraph.support; import net.jcip.annotations.Immutable; diff --git a/src/main/java/util/meta/classdependency/classgraph/support/JavaRef.java b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/support/JavaRef.java similarity index 95% rename from src/main/java/util/meta/classdependency/classgraph/support/JavaRef.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/support/JavaRef.java index f13fa32..0c59ec3 100644 --- a/src/main/java/util/meta/classdependency/classgraph/support/JavaRef.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/classgraph/support/JavaRef.java @@ -1,4 +1,4 @@ -package util.meta.classdependency.classgraph.support; +package gov.hhs.aspr.ms.util.meta.classdependency.classgraph.support; import net.jcip.annotations.Immutable; diff --git a/src/main/java/util/meta/classdependency/dependency/DependencyGraph.java b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/dependency/DependencyGraph.java similarity index 89% rename from src/main/java/util/meta/classdependency/dependency/DependencyGraph.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/dependency/DependencyGraph.java index c2b4558..709b262 100644 --- a/src/main/java/util/meta/classdependency/dependency/DependencyGraph.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/dependency/DependencyGraph.java @@ -1,4 +1,4 @@ -package util.meta.classdependency.dependency; +package gov.hhs.aspr.ms.util.meta.classdependency.dependency; import java.io.IOException; import java.nio.file.Files; @@ -7,8 +7,8 @@ import java.util.List; import java.util.Optional; -import util.graph.Graph; -import util.graph.GraphDepthEvaluator; +import gov.hhs.aspr.ms.util.graph.Graph; +import gov.hhs.aspr.ms.util.graph.GraphDepthEvaluator; public class DependencyGraph { private final Path file; diff --git a/src/main/java/util/meta/classdependency/dependency/DependencyTracer.java b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/dependency/DependencyTracer.java similarity index 98% rename from src/main/java/util/meta/classdependency/dependency/DependencyTracer.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/dependency/DependencyTracer.java index b175c34..06ec711 100644 --- a/src/main/java/util/meta/classdependency/dependency/DependencyTracer.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/classdependency/dependency/DependencyTracer.java @@ -1,4 +1,4 @@ -package util.meta.classdependency.dependency; +package gov.hhs.aspr.ms.util.meta.classdependency.dependency; import java.io.IOException; import java.nio.file.FileVisitResult; diff --git a/src/main/java/util/meta/codecount/CodeCountReport.java b/src/main/java/gov/hhs/aspr/ms/util/meta/codecount/CodeCountReport.java similarity index 98% rename from src/main/java/util/meta/codecount/CodeCountReport.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/codecount/CodeCountReport.java index a5b8a66..ab209ad 100644 --- a/src/main/java/util/meta/codecount/CodeCountReport.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/codecount/CodeCountReport.java @@ -1,4 +1,4 @@ -package util.meta.codecount; +package gov.hhs.aspr.ms.util.meta.codecount; import java.io.IOException; import java.nio.file.FileVisitResult; @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Set; -import util.wrappers.MutableInteger; +import gov.hhs.aspr.ms.util.wrappers.MutableInteger; public class CodeCountReport { diff --git a/src/main/java/util/meta/packagedependency/PackageDependencyData.java b/src/main/java/gov/hhs/aspr/ms/util/meta/packagedependency/PackageDependencyData.java similarity index 96% rename from src/main/java/util/meta/packagedependency/PackageDependencyData.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/packagedependency/PackageDependencyData.java index f05d131..456c706 100644 --- a/src/main/java/util/meta/packagedependency/PackageDependencyData.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/packagedependency/PackageDependencyData.java @@ -1,12 +1,12 @@ -package util.meta.packagedependency; +package gov.hhs.aspr.ms.util.meta.packagedependency; import java.nio.file.Path; import java.util.LinkedHashSet; import java.util.Set; -import util.graph.Graph; -import util.graph.MutableGraph; -import util.meta.packagedependency.reports.PackageDependencyReport; +import gov.hhs.aspr.ms.util.graph.Graph; +import gov.hhs.aspr.ms.util.graph.MutableGraph; +import gov.hhs.aspr.ms.util.meta.packagedependency.reports.PackageDependencyReport; /** * An immutable container for holding the primary level of package dependency diff --git a/src/main/java/util/meta/packagedependency/PackageDependencyDataGenerator.java b/src/main/java/gov/hhs/aspr/ms/util/meta/packagedependency/PackageDependencyDataGenerator.java similarity index 96% rename from src/main/java/util/meta/packagedependency/PackageDependencyDataGenerator.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/packagedependency/PackageDependencyDataGenerator.java index 0cb4251..032d656 100644 --- a/src/main/java/util/meta/packagedependency/PackageDependencyDataGenerator.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/packagedependency/PackageDependencyDataGenerator.java @@ -1,4 +1,4 @@ -package util.meta.packagedependency; +package gov.hhs.aspr.ms.util.meta.packagedependency; import java.io.File; import java.io.IOException; @@ -15,9 +15,9 @@ import java.util.Map; import java.util.Set; -import util.graph.MutableGraph; -import util.meta.packagedependency.PackageDependencyData.PackageDependencyDetails; -import util.meta.packagedependency.PackageDependencyData.PackageRef; +import gov.hhs.aspr.ms.util.graph.MutableGraph; +import gov.hhs.aspr.ms.util.meta.packagedependency.PackageDependencyData.PackageDependencyDetails; +import gov.hhs.aspr.ms.util.meta.packagedependency.PackageDependencyData.PackageRef; /** * An utility class for generating a {@linkplain PackageDependencyData} that diff --git a/src/main/java/util/meta/packagedependency/reports/PackageDependencyReport.java b/src/main/java/gov/hhs/aspr/ms/util/meta/packagedependency/reports/PackageDependencyReport.java similarity index 95% rename from src/main/java/util/meta/packagedependency/reports/PackageDependencyReport.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/packagedependency/reports/PackageDependencyReport.java index f7bcf70..8aed347 100644 --- a/src/main/java/util/meta/packagedependency/reports/PackageDependencyReport.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/packagedependency/reports/PackageDependencyReport.java @@ -1,4 +1,4 @@ -package util.meta.packagedependency.reports; +package gov.hhs.aspr.ms.util.meta.packagedependency.reports; import java.nio.file.Path; import java.nio.file.Paths; @@ -7,13 +7,13 @@ import java.util.Optional; import java.util.Set; -import util.graph.Graph; -import util.graph.GraphDepthEvaluator; -import util.graph.Graphs; -import util.meta.packagedependency.PackageDependencyData; -import util.meta.packagedependency.PackageDependencyData.PackageDependencyDetails; -import util.meta.packagedependency.PackageDependencyData.PackageRef; -import util.meta.packagedependency.PackageDependencyDataGenerator; +import gov.hhs.aspr.ms.util.graph.Graph; +import gov.hhs.aspr.ms.util.graph.GraphDepthEvaluator; +import gov.hhs.aspr.ms.util.graph.Graphs; +import gov.hhs.aspr.ms.util.meta.packagedependency.PackageDependencyData; +import gov.hhs.aspr.ms.util.meta.packagedependency.PackageDependencyDataGenerator; +import gov.hhs.aspr.ms.util.meta.packagedependency.PackageDependencyData.PackageDependencyDetails; +import gov.hhs.aspr.ms.util.meta.packagedependency.PackageDependencyData.PackageRef; /** * A console report detailing java package level dependencies across multiple diff --git a/src/main/java/util/meta/unittestcoverage/MetaInfoContainer.java b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/MetaInfoContainer.java similarity index 90% rename from src/main/java/util/meta/unittestcoverage/MetaInfoContainer.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/MetaInfoContainer.java index 33e608e..a4f6a14 100644 --- a/src/main/java/util/meta/unittestcoverage/MetaInfoContainer.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/MetaInfoContainer.java @@ -1,14 +1,14 @@ -package util.meta.unittestcoverage; +package gov.hhs.aspr.ms.util.meta.unittestcoverage; import java.util.ArrayList; import java.util.List; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestField; -import util.annotations.UnitTestMethod; -import util.meta.unittestcoverage.warnings.ConstructorWarning; -import util.meta.unittestcoverage.warnings.FieldWarning; -import util.meta.unittestcoverage.warnings.MethodWarning; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestField; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.ConstructorWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.FieldWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.MethodWarning; public final class MetaInfoContainer { private static class Data { diff --git a/src/main/java/util/meta/unittestcoverage/MetaInfoGenerator.java b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/MetaInfoGenerator.java similarity index 95% rename from src/main/java/util/meta/unittestcoverage/MetaInfoGenerator.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/MetaInfoGenerator.java index 48dc803..0ee2292 100644 --- a/src/main/java/util/meta/unittestcoverage/MetaInfoGenerator.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/MetaInfoGenerator.java @@ -1,4 +1,4 @@ -package util.meta.unittestcoverage; +package gov.hhs.aspr.ms.util.meta.unittestcoverage; import java.io.File; import java.io.IOException; @@ -17,14 +17,14 @@ import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestField; -import util.annotations.UnitTestForCoverage; -import util.annotations.UnitTestMethod; -import util.meta.unittestcoverage.warnings.ConstructorWarning; -import util.meta.unittestcoverage.warnings.FieldWarning; -import util.meta.unittestcoverage.warnings.MethodWarning; -import util.meta.unittestcoverage.warnings.WarningType; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestField; +import gov.hhs.aspr.ms.util.annotations.UnitTestForCoverage; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.ConstructorWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.FieldWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.MethodWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.WarningType; /** * A utility class for generating various warnings on the coverage deficiencies diff --git a/src/main/java/util/meta/unittestcoverage/reports/IncompleteClassReport.java b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/reports/IncompleteClassReport.java similarity index 76% rename from src/main/java/util/meta/unittestcoverage/reports/IncompleteClassReport.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/reports/IncompleteClassReport.java index 586c5a1..08e40a8 100644 --- a/src/main/java/util/meta/unittestcoverage/reports/IncompleteClassReport.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/reports/IncompleteClassReport.java @@ -1,16 +1,16 @@ -package util.meta.unittestcoverage.reports; +package gov.hhs.aspr.ms.util.meta.unittestcoverage.reports; import java.nio.file.Path; import java.nio.file.Paths; import java.util.LinkedHashSet; import java.util.Set; -import util.meta.unittestcoverage.MetaInfoContainer; -import util.meta.unittestcoverage.MetaInfoGenerator; -import util.meta.unittestcoverage.warnings.ConstructorWarning; -import util.meta.unittestcoverage.warnings.FieldWarning; -import util.meta.unittestcoverage.warnings.MethodWarning; -import util.meta.unittestcoverage.warnings.WarningType; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.MetaInfoContainer; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.MetaInfoGenerator; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.ConstructorWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.FieldWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.MethodWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.WarningType; public final class IncompleteClassReport { diff --git a/src/main/java/util/meta/unittestcoverage/reports/MetaInfoReport.java b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/reports/MetaInfoReport.java similarity index 89% rename from src/main/java/util/meta/unittestcoverage/reports/MetaInfoReport.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/reports/MetaInfoReport.java index f30b9c4..21b6454 100644 --- a/src/main/java/util/meta/unittestcoverage/reports/MetaInfoReport.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/reports/MetaInfoReport.java @@ -1,4 +1,4 @@ -package util.meta.unittestcoverage.reports; +package gov.hhs.aspr.ms.util.meta.unittestcoverage.reports; import java.nio.file.Path; import java.nio.file.Paths; @@ -8,16 +8,16 @@ import java.util.List; import java.util.Map; -import util.annotations.UnitTag; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestField; -import util.annotations.UnitTestMethod; -import util.meta.unittestcoverage.MetaInfoContainer; -import util.meta.unittestcoverage.MetaInfoGenerator; -import util.meta.unittestcoverage.warnings.ConstructorWarning; -import util.meta.unittestcoverage.warnings.FieldWarning; -import util.meta.unittestcoverage.warnings.MethodWarning; -import util.meta.unittestcoverage.warnings.WarningType; +import gov.hhs.aspr.ms.util.annotations.UnitTag; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestField; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.MetaInfoContainer; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.MetaInfoGenerator; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.ConstructorWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.FieldWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.MethodWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.WarningType; /** * A script covering the details of the GCM Test Plan. It produces a console diff --git a/src/main/java/util/meta/unittestcoverage/reports/MissingTestsReport.java b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/reports/MissingTestsReport.java similarity index 86% rename from src/main/java/util/meta/unittestcoverage/reports/MissingTestsReport.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/reports/MissingTestsReport.java index 7b4a942..8f5523d 100644 --- a/src/main/java/util/meta/unittestcoverage/reports/MissingTestsReport.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/reports/MissingTestsReport.java @@ -1,4 +1,4 @@ -package util.meta.unittestcoverage.reports; +package gov.hhs.aspr.ms.util.meta.unittestcoverage.reports; import java.nio.file.Path; import java.nio.file.Paths; @@ -7,12 +7,12 @@ import java.util.Map; import java.util.TreeMap; -import util.meta.unittestcoverage.MetaInfoContainer; -import util.meta.unittestcoverage.MetaInfoGenerator; -import util.meta.unittestcoverage.warnings.ConstructorWarning; -import util.meta.unittestcoverage.warnings.FieldWarning; -import util.meta.unittestcoverage.warnings.MethodWarning; -import util.meta.unittestcoverage.warnings.WarningType; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.MetaInfoContainer; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.MetaInfoGenerator; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.ConstructorWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.FieldWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.MethodWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.WarningType; /** * A script that produces a console report shows missing unit tests. diff --git a/src/main/java/util/meta/unittestcoverage/reports/StatusReport.java b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/reports/StatusReport.java similarity index 75% rename from src/main/java/util/meta/unittestcoverage/reports/StatusReport.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/reports/StatusReport.java index 2329cca..fa2f776 100644 --- a/src/main/java/util/meta/unittestcoverage/reports/StatusReport.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/reports/StatusReport.java @@ -1,13 +1,13 @@ -package util.meta.unittestcoverage.reports; +package gov.hhs.aspr.ms.util.meta.unittestcoverage.reports; import java.nio.file.Path; import java.nio.file.Paths; -import util.meta.unittestcoverage.MetaInfoContainer; -import util.meta.unittestcoverage.MetaInfoGenerator; -import util.meta.unittestcoverage.warnings.ConstructorWarning; -import util.meta.unittestcoverage.warnings.FieldWarning; -import util.meta.unittestcoverage.warnings.MethodWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.MetaInfoContainer; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.MetaInfoGenerator; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.ConstructorWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.FieldWarning; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings.MethodWarning; public final class StatusReport { diff --git a/src/main/java/util/meta/unittestcoverage/warnings/ConstructorWarning.java b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/warnings/ConstructorWarning.java similarity index 96% rename from src/main/java/util/meta/unittestcoverage/warnings/ConstructorWarning.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/warnings/ConstructorWarning.java index 8de1e9a..28a7043 100644 --- a/src/main/java/util/meta/unittestcoverage/warnings/ConstructorWarning.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/warnings/ConstructorWarning.java @@ -1,4 +1,4 @@ -package util.meta.unittestcoverage.warnings; +package gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings; import java.lang.reflect.Constructor; diff --git a/src/main/java/util/meta/unittestcoverage/warnings/FieldWarning.java b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/warnings/FieldWarning.java similarity index 96% rename from src/main/java/util/meta/unittestcoverage/warnings/FieldWarning.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/warnings/FieldWarning.java index b4b69c1..3b78e82 100644 --- a/src/main/java/util/meta/unittestcoverage/warnings/FieldWarning.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/warnings/FieldWarning.java @@ -1,4 +1,4 @@ -package util.meta.unittestcoverage.warnings; +package gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings; import java.lang.reflect.Field; diff --git a/src/main/java/util/meta/unittestcoverage/warnings/MethodWarning.java b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/warnings/MethodWarning.java similarity index 96% rename from src/main/java/util/meta/unittestcoverage/warnings/MethodWarning.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/warnings/MethodWarning.java index a2e4d62..42356d6 100644 --- a/src/main/java/util/meta/unittestcoverage/warnings/MethodWarning.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/warnings/MethodWarning.java @@ -1,4 +1,4 @@ -package util.meta.unittestcoverage.warnings; +package gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings; import java.lang.reflect.Method; diff --git a/src/main/java/util/meta/unittestcoverage/warnings/WarningType.java b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/warnings/WarningType.java similarity index 97% rename from src/main/java/util/meta/unittestcoverage/warnings/WarningType.java rename to src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/warnings/WarningType.java index 3f538da..162d020 100644 --- a/src/main/java/util/meta/unittestcoverage/warnings/WarningType.java +++ b/src/main/java/gov/hhs/aspr/ms/util/meta/unittestcoverage/warnings/WarningType.java @@ -1,4 +1,4 @@ -package util.meta.unittestcoverage.warnings; +package gov.hhs.aspr.ms.util.meta.unittestcoverage.warnings; public enum WarningType { diff --git a/src/main/java/util/path/ArrayPathSolver.java b/src/main/java/gov/hhs/aspr/ms/util/path/ArrayPathSolver.java similarity index 93% rename from src/main/java/util/path/ArrayPathSolver.java rename to src/main/java/gov/hhs/aspr/ms/util/path/ArrayPathSolver.java index 6f9440b..f92f40a 100644 --- a/src/main/java/util/path/ArrayPathSolver.java +++ b/src/main/java/gov/hhs/aspr/ms/util/path/ArrayPathSolver.java @@ -1,4 +1,4 @@ -package util.path; +package gov.hhs.aspr.ms.util.path; import java.lang.reflect.Array; import java.util.ArrayList; @@ -7,9 +7,9 @@ import java.util.Map; import java.util.Optional; -import util.graph.Graph; -import util.path.Paths.EdgeCostEvaluator; -import util.path.Paths.TravelCostEvaluator; +import gov.hhs.aspr.ms.util.graph.Graph; +import gov.hhs.aspr.ms.util.path.Paths.EdgeCostEvaluator; +import gov.hhs.aspr.ms.util.path.Paths.TravelCostEvaluator; /** * Manages shortest path solutions for a given graph with reasonable efficiency diff --git a/src/main/java/util/path/MapPathSolver.java b/src/main/java/gov/hhs/aspr/ms/util/path/MapPathSolver.java similarity index 92% rename from src/main/java/util/path/MapPathSolver.java rename to src/main/java/gov/hhs/aspr/ms/util/path/MapPathSolver.java index 6b944e1..511d719 100644 --- a/src/main/java/util/path/MapPathSolver.java +++ b/src/main/java/gov/hhs/aspr/ms/util/path/MapPathSolver.java @@ -1,4 +1,4 @@ -package util.path; +package gov.hhs.aspr.ms.util.path; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -6,10 +6,10 @@ import java.util.Map; import java.util.Optional; -import util.graph.Graph; -import util.path.Paths.EdgeCostEvaluator; -import util.path.Paths.TravelCostEvaluator; -import util.wrappers.MultiKey; +import gov.hhs.aspr.ms.util.graph.Graph; +import gov.hhs.aspr.ms.util.path.Paths.EdgeCostEvaluator; +import gov.hhs.aspr.ms.util.path.Paths.TravelCostEvaluator; +import gov.hhs.aspr.ms.util.wrappers.MultiKey; /** * Manages shortest path solutions for a given graph with reasonable efficiency diff --git a/src/main/java/util/path/Path.java b/src/main/java/gov/hhs/aspr/ms/util/path/Path.java similarity index 98% rename from src/main/java/util/path/Path.java rename to src/main/java/gov/hhs/aspr/ms/util/path/Path.java index 3688c24..5bd6b71 100644 --- a/src/main/java/util/path/Path.java +++ b/src/main/java/gov/hhs/aspr/ms/util/path/Path.java @@ -1,4 +1,4 @@ -package util.path; +package gov.hhs.aspr.ms.util.path; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/util/path/PathSolver.java b/src/main/java/gov/hhs/aspr/ms/util/path/PathSolver.java similarity index 85% rename from src/main/java/util/path/PathSolver.java rename to src/main/java/gov/hhs/aspr/ms/util/path/PathSolver.java index bab218d..d38f03c 100644 --- a/src/main/java/util/path/PathSolver.java +++ b/src/main/java/gov/hhs/aspr/ms/util/path/PathSolver.java @@ -1,4 +1,4 @@ -package util.path; +package gov.hhs.aspr.ms.util.path; import java.util.Optional; diff --git a/src/main/java/util/path/Paths.java b/src/main/java/gov/hhs/aspr/ms/util/path/Paths.java similarity index 98% rename from src/main/java/util/path/Paths.java rename to src/main/java/gov/hhs/aspr/ms/util/path/Paths.java index 3044dcd..d951437 100644 --- a/src/main/java/util/path/Paths.java +++ b/src/main/java/gov/hhs/aspr/ms/util/path/Paths.java @@ -1,4 +1,4 @@ -package util.path; +package gov.hhs.aspr.ms.util.path; import java.util.ArrayList; import java.util.Collections; @@ -8,8 +8,8 @@ import java.util.Optional; import java.util.PriorityQueue; -import util.graph.Graph; -import util.path.Path.Builder; +import gov.hhs.aspr.ms.util.graph.Graph; +import gov.hhs.aspr.ms.util.path.Path.Builder; /** * Solves a shortest path through a graph from an origin node to a destination diff --git a/src/main/java/util/random/RandomGeneratorProvider.java b/src/main/java/gov/hhs/aspr/ms/util/random/RandomGeneratorProvider.java similarity index 88% rename from src/main/java/util/random/RandomGeneratorProvider.java rename to src/main/java/gov/hhs/aspr/ms/util/random/RandomGeneratorProvider.java index c1662d4..b4a0066 100644 --- a/src/main/java/util/random/RandomGeneratorProvider.java +++ b/src/main/java/gov/hhs/aspr/ms/util/random/RandomGeneratorProvider.java @@ -1,4 +1,4 @@ -package util.random; +package gov.hhs.aspr.ms.util.random; import org.apache.commons.math3.random.RandomGenerator; import org.apache.commons.math3.random.Well44497b; diff --git a/src/main/java/util/resourcehelper/TestResourceHelper.java b/src/main/java/gov/hhs/aspr/ms/util/resourcehelper/TestResourceHelper.java similarity index 96% rename from src/main/java/util/resourcehelper/TestResourceHelper.java rename to src/main/java/gov/hhs/aspr/ms/util/resourcehelper/TestResourceHelper.java index 245f2b5..254816e 100644 --- a/src/main/java/util/resourcehelper/TestResourceHelper.java +++ b/src/main/java/gov/hhs/aspr/ms/util/resourcehelper/TestResourceHelper.java @@ -1,4 +1,4 @@ -package util.resourcehelper; +package gov.hhs.aspr.ms.util.resourcehelper; import java.io.File; import java.io.IOException; diff --git a/src/main/java/util/spherical/Chirality.java b/src/main/java/gov/hhs/aspr/ms/util/spherical/Chirality.java similarity index 83% rename from src/main/java/util/spherical/Chirality.java rename to src/main/java/gov/hhs/aspr/ms/util/spherical/Chirality.java index 7e54bbb..86fef25 100644 --- a/src/main/java/util/spherical/Chirality.java +++ b/src/main/java/gov/hhs/aspr/ms/util/spherical/Chirality.java @@ -1,4 +1,4 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; /** * Enumeration representing the chirality of triangle vertex ordering on the diff --git a/src/main/java/util/spherical/MalformedSphericalArcException.java b/src/main/java/gov/hhs/aspr/ms/util/spherical/MalformedSphericalArcException.java similarity index 91% rename from src/main/java/util/spherical/MalformedSphericalArcException.java rename to src/main/java/gov/hhs/aspr/ms/util/spherical/MalformedSphericalArcException.java index a709cd9..ac5af8c 100644 --- a/src/main/java/util/spherical/MalformedSphericalArcException.java +++ b/src/main/java/gov/hhs/aspr/ms/util/spherical/MalformedSphericalArcException.java @@ -1,4 +1,4 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; /** * A RuntimeException thrown when a {@link SphericalArc} cannot be formed due to diff --git a/src/main/java/util/spherical/MalformedSphericalPointException.java b/src/main/java/gov/hhs/aspr/ms/util/spherical/MalformedSphericalPointException.java similarity index 90% rename from src/main/java/util/spherical/MalformedSphericalPointException.java rename to src/main/java/gov/hhs/aspr/ms/util/spherical/MalformedSphericalPointException.java index 4ce164e..6bcd4a4 100644 --- a/src/main/java/util/spherical/MalformedSphericalPointException.java +++ b/src/main/java/gov/hhs/aspr/ms/util/spherical/MalformedSphericalPointException.java @@ -1,4 +1,4 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; /** * A RuntimeException thrown when a {@link SphericalPoint} cannot be formed due diff --git a/src/main/java/util/spherical/MalformedSphericalPolygonException.java b/src/main/java/gov/hhs/aspr/ms/util/spherical/MalformedSphericalPolygonException.java similarity index 90% rename from src/main/java/util/spherical/MalformedSphericalPolygonException.java rename to src/main/java/gov/hhs/aspr/ms/util/spherical/MalformedSphericalPolygonException.java index 5ce40ff..5b62a8c 100644 --- a/src/main/java/util/spherical/MalformedSphericalPolygonException.java +++ b/src/main/java/gov/hhs/aspr/ms/util/spherical/MalformedSphericalPolygonException.java @@ -1,4 +1,4 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; /** * A RuntimeException thrown when a {@link SphericalPolygon} cannot be formed diff --git a/src/main/java/util/spherical/MalformedSphericalTriangleException.java b/src/main/java/gov/hhs/aspr/ms/util/spherical/MalformedSphericalTriangleException.java similarity index 90% rename from src/main/java/util/spherical/MalformedSphericalTriangleException.java rename to src/main/java/gov/hhs/aspr/ms/util/spherical/MalformedSphericalTriangleException.java index 9ccca3d..6dfb66c 100644 --- a/src/main/java/util/spherical/MalformedSphericalTriangleException.java +++ b/src/main/java/gov/hhs/aspr/ms/util/spherical/MalformedSphericalTriangleException.java @@ -1,4 +1,4 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; /** * A RuntimeException thrown when a {@link SphericalTriangle} cannot be formed. diff --git a/src/main/java/util/spherical/SphericalArc.java b/src/main/java/gov/hhs/aspr/ms/util/spherical/SphericalArc.java similarity index 97% rename from src/main/java/util/spherical/SphericalArc.java rename to src/main/java/gov/hhs/aspr/ms/util/spherical/SphericalArc.java index 8818e00..22929a2 100644 --- a/src/main/java/util/spherical/SphericalArc.java +++ b/src/main/java/gov/hhs/aspr/ms/util/spherical/SphericalArc.java @@ -1,12 +1,12 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; import java.util.Arrays; import org.apache.commons.math3.util.FastMath; +import gov.hhs.aspr.ms.util.vector.MutableVector3D; +import gov.hhs.aspr.ms.util.vector.Vector3D; import net.jcip.annotations.Immutable; -import util.vector.MutableVector3D; -import util.vector.Vector3D; /** * Represents an immutable great arc segment on the unit sphere defined by two diff --git a/src/main/java/util/spherical/SphericalPoint.java b/src/main/java/gov/hhs/aspr/ms/util/spherical/SphericalPoint.java similarity index 92% rename from src/main/java/util/spherical/SphericalPoint.java rename to src/main/java/gov/hhs/aspr/ms/util/spherical/SphericalPoint.java index 2fb6b30..1370d03 100644 --- a/src/main/java/util/spherical/SphericalPoint.java +++ b/src/main/java/gov/hhs/aspr/ms/util/spherical/SphericalPoint.java @@ -1,8 +1,8 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; +import gov.hhs.aspr.ms.util.vector.MutableVector3D; +import gov.hhs.aspr.ms.util.vector.Vector3D; import net.jcip.annotations.Immutable; -import util.vector.MutableVector3D; -import util.vector.Vector3D; /** * Represents an immutable point on the unit sphere. Instances are created via diff --git a/src/main/java/util/spherical/SphericalPolygon.java b/src/main/java/gov/hhs/aspr/ms/util/spherical/SphericalPolygon.java similarity index 98% rename from src/main/java/util/spherical/SphericalPolygon.java rename to src/main/java/gov/hhs/aspr/ms/util/spherical/SphericalPolygon.java index d2810df..bf95d9f 100644 --- a/src/main/java/util/spherical/SphericalPolygon.java +++ b/src/main/java/gov/hhs/aspr/ms/util/spherical/SphericalPolygon.java @@ -1,13 +1,13 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; import java.util.ArrayList; import java.util.List; import org.apache.commons.math3.util.FastMath; +import gov.hhs.aspr.ms.util.dimensiontree.VolumetricDimensionTree; +import gov.hhs.aspr.ms.util.vector.MutableVector3D; import net.jcip.annotations.Immutable; -import util.dimensiontree.VolumetricDimensionTree; -import util.vector.MutableVector3D; /** * Represents an immutable, non-crossing polygon on the surface of a unit diff --git a/src/main/java/util/spherical/SphericalTriangle.java b/src/main/java/gov/hhs/aspr/ms/util/spherical/SphericalTriangle.java similarity index 97% rename from src/main/java/util/spherical/SphericalTriangle.java rename to src/main/java/gov/hhs/aspr/ms/util/spherical/SphericalTriangle.java index a0ff5aa..f9e4e4a 100644 --- a/src/main/java/util/spherical/SphericalTriangle.java +++ b/src/main/java/gov/hhs/aspr/ms/util/spherical/SphericalTriangle.java @@ -1,10 +1,10 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; import org.apache.commons.math3.util.FastMath; +import gov.hhs.aspr.ms.util.vector.MutableVector3D; +import gov.hhs.aspr.ms.util.vector.Vector3D; import net.jcip.annotations.Immutable; -import util.vector.MutableVector3D; -import util.vector.Vector3D; /** * Represents an immutable triangle on the unit sphere. diff --git a/src/main/java/util/stats/BinContainer.java b/src/main/java/gov/hhs/aspr/ms/util/stats/BinContainer.java similarity index 99% rename from src/main/java/util/stats/BinContainer.java rename to src/main/java/gov/hhs/aspr/ms/util/stats/BinContainer.java index acff2bc..e3983ce 100644 --- a/src/main/java/util/stats/BinContainer.java +++ b/src/main/java/gov/hhs/aspr/ms/util/stats/BinContainer.java @@ -1,4 +1,4 @@ -package util.stats; +package gov.hhs.aspr.ms.util.stats; import java.util.LinkedHashMap; import java.util.Map; diff --git a/src/main/java/util/stats/ImmutableStat.java b/src/main/java/gov/hhs/aspr/ms/util/stats/ImmutableStat.java similarity index 99% rename from src/main/java/util/stats/ImmutableStat.java rename to src/main/java/gov/hhs/aspr/ms/util/stats/ImmutableStat.java index c4aa25a..2a5cf64 100644 --- a/src/main/java/util/stats/ImmutableStat.java +++ b/src/main/java/gov/hhs/aspr/ms/util/stats/ImmutableStat.java @@ -1,4 +1,4 @@ -package util.stats; +package gov.hhs.aspr.ms.util.stats; import java.util.Optional; diff --git a/src/main/java/util/stats/KahanSum.java b/src/main/java/gov/hhs/aspr/ms/util/stats/KahanSum.java similarity index 93% rename from src/main/java/util/stats/KahanSum.java rename to src/main/java/gov/hhs/aspr/ms/util/stats/KahanSum.java index bb1cbcc..9749f0e 100644 --- a/src/main/java/util/stats/KahanSum.java +++ b/src/main/java/gov/hhs/aspr/ms/util/stats/KahanSum.java @@ -1,4 +1,4 @@ -package util.stats; +package gov.hhs.aspr.ms.util.stats; /** * Implements the error reducing methodology for sums of floating point numbers diff --git a/src/main/java/util/stats/MutableStat.java b/src/main/java/gov/hhs/aspr/ms/util/stats/MutableStat.java similarity index 99% rename from src/main/java/util/stats/MutableStat.java rename to src/main/java/gov/hhs/aspr/ms/util/stats/MutableStat.java index 09b0997..336766f 100644 --- a/src/main/java/util/stats/MutableStat.java +++ b/src/main/java/gov/hhs/aspr/ms/util/stats/MutableStat.java @@ -1,4 +1,4 @@ -package util.stats; +package gov.hhs.aspr.ms.util.stats; import java.util.Collection; import java.util.Optional; diff --git a/src/main/java/util/stats/Stat.java b/src/main/java/gov/hhs/aspr/ms/util/stats/Stat.java similarity index 97% rename from src/main/java/util/stats/Stat.java rename to src/main/java/gov/hhs/aspr/ms/util/stats/Stat.java index 5286c94..d500bd1 100644 --- a/src/main/java/util/stats/Stat.java +++ b/src/main/java/gov/hhs/aspr/ms/util/stats/Stat.java @@ -1,4 +1,4 @@ -package util.stats; +package gov.hhs.aspr.ms.util.stats; import java.util.Optional; diff --git a/src/main/java/util/time/Stopwatch.java b/src/main/java/gov/hhs/aspr/ms/util/time/Stopwatch.java similarity index 97% rename from src/main/java/util/time/Stopwatch.java rename to src/main/java/gov/hhs/aspr/ms/util/time/Stopwatch.java index fbbdd12..34000c3 100644 --- a/src/main/java/util/time/Stopwatch.java +++ b/src/main/java/gov/hhs/aspr/ms/util/time/Stopwatch.java @@ -1,4 +1,4 @@ -package util.time; +package gov.hhs.aspr.ms.util.time; /** * A nano-time based accumulator of elapsed time that allows the client to start diff --git a/src/main/java/util/time/TimeElapser.java b/src/main/java/gov/hhs/aspr/ms/util/time/TimeElapser.java similarity index 96% rename from src/main/java/util/time/TimeElapser.java rename to src/main/java/gov/hhs/aspr/ms/util/time/TimeElapser.java index b16ef9a..e03cc66 100644 --- a/src/main/java/util/time/TimeElapser.java +++ b/src/main/java/gov/hhs/aspr/ms/util/time/TimeElapser.java @@ -1,4 +1,4 @@ -package util.time; +package gov.hhs.aspr.ms.util.time; /** * A debug-convenience class for measuring elapsed time via System.nanoTime() diff --git a/src/main/java/util/vector/Circle2D.java b/src/main/java/gov/hhs/aspr/ms/util/vector/Circle2D.java similarity index 99% rename from src/main/java/util/vector/Circle2D.java rename to src/main/java/gov/hhs/aspr/ms/util/vector/Circle2D.java index 8d73314..894e876 100644 --- a/src/main/java/util/vector/Circle2D.java +++ b/src/main/java/gov/hhs/aspr/ms/util/vector/Circle2D.java @@ -1,11 +1,11 @@ -package util.vector; +package gov.hhs.aspr.ms.util.vector; import java.util.List; import org.apache.commons.math3.util.FastMath; +import gov.hhs.aspr.ms.util.spherical.Chirality; import net.jcip.annotations.Immutable; -import util.spherical.Chirality; /** * A utility for calculating the smallest circle that encompasses a set of 2D diff --git a/src/main/java/util/vector/MutableVector2D.java b/src/main/java/gov/hhs/aspr/ms/util/vector/MutableVector2D.java similarity index 99% rename from src/main/java/util/vector/MutableVector2D.java rename to src/main/java/gov/hhs/aspr/ms/util/vector/MutableVector2D.java index 9d9736e..5669d5e 100644 --- a/src/main/java/util/vector/MutableVector2D.java +++ b/src/main/java/gov/hhs/aspr/ms/util/vector/MutableVector2D.java @@ -1,8 +1,8 @@ -package util.vector; +package gov.hhs.aspr.ms.util.vector; import org.apache.commons.math3.util.FastMath; -import util.spherical.Chirality; +import gov.hhs.aspr.ms.util.spherical.Chirality; /** * A mutable 2-dimensional vector class supporting common 2D transforms. diff --git a/src/main/java/util/vector/MutableVector3D.java b/src/main/java/gov/hhs/aspr/ms/util/vector/MutableVector3D.java similarity index 99% rename from src/main/java/util/vector/MutableVector3D.java rename to src/main/java/gov/hhs/aspr/ms/util/vector/MutableVector3D.java index d0ba00e..6d1ea81 100644 --- a/src/main/java/util/vector/MutableVector3D.java +++ b/src/main/java/gov/hhs/aspr/ms/util/vector/MutableVector3D.java @@ -1,4 +1,4 @@ -package util.vector; +package gov.hhs.aspr.ms.util.vector; import org.apache.commons.math3.util.FastMath; diff --git a/src/main/java/util/vector/NonNormalVectorException.java b/src/main/java/gov/hhs/aspr/ms/util/vector/NonNormalVectorException.java similarity index 90% rename from src/main/java/util/vector/NonNormalVectorException.java rename to src/main/java/gov/hhs/aspr/ms/util/vector/NonNormalVectorException.java index 241c0c4..e58feb0 100644 --- a/src/main/java/util/vector/NonNormalVectorException.java +++ b/src/main/java/gov/hhs/aspr/ms/util/vector/NonNormalVectorException.java @@ -1,4 +1,4 @@ -package util.vector; +package gov.hhs.aspr.ms.util.vector; /** * A RuntimeException thrown when a vector is not normal(length = 1); diff --git a/src/main/java/util/vector/Vector2D.java b/src/main/java/gov/hhs/aspr/ms/util/vector/Vector2D.java similarity index 99% rename from src/main/java/util/vector/Vector2D.java rename to src/main/java/gov/hhs/aspr/ms/util/vector/Vector2D.java index c4ed4f7..2de7598 100644 --- a/src/main/java/util/vector/Vector2D.java +++ b/src/main/java/gov/hhs/aspr/ms/util/vector/Vector2D.java @@ -1,9 +1,9 @@ -package util.vector; +package gov.hhs.aspr.ms.util.vector; import org.apache.commons.math3.util.FastMath; +import gov.hhs.aspr.ms.util.spherical.Chirality; import net.jcip.annotations.Immutable; -import util.spherical.Chirality; /** * A immutable 2-dimensional vector class supporting common 2D transforms. diff --git a/src/main/java/util/vector/Vector3D.java b/src/main/java/gov/hhs/aspr/ms/util/vector/Vector3D.java similarity index 99% rename from src/main/java/util/vector/Vector3D.java rename to src/main/java/gov/hhs/aspr/ms/util/vector/Vector3D.java index 0b4dbf4..f3496a1 100644 --- a/src/main/java/util/vector/Vector3D.java +++ b/src/main/java/gov/hhs/aspr/ms/util/vector/Vector3D.java @@ -1,4 +1,4 @@ -package util.vector; +package gov.hhs.aspr.ms.util.vector; import org.apache.commons.math3.util.FastMath; diff --git a/src/main/java/util/wrappers/MultiKey.java b/src/main/java/gov/hhs/aspr/ms/util/wrappers/MultiKey.java similarity index 98% rename from src/main/java/util/wrappers/MultiKey.java rename to src/main/java/gov/hhs/aspr/ms/util/wrappers/MultiKey.java index 47c082d..b299b47 100644 --- a/src/main/java/util/wrappers/MultiKey.java +++ b/src/main/java/gov/hhs/aspr/ms/util/wrappers/MultiKey.java @@ -1,4 +1,4 @@ -package util.wrappers; +package gov.hhs.aspr.ms.util.wrappers; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/util/wrappers/MutableBoolean.java b/src/main/java/gov/hhs/aspr/ms/util/wrappers/MutableBoolean.java similarity index 97% rename from src/main/java/util/wrappers/MutableBoolean.java rename to src/main/java/gov/hhs/aspr/ms/util/wrappers/MutableBoolean.java index 22360fe..e737652 100644 --- a/src/main/java/util/wrappers/MutableBoolean.java +++ b/src/main/java/gov/hhs/aspr/ms/util/wrappers/MutableBoolean.java @@ -1,4 +1,4 @@ -package util.wrappers; +package gov.hhs.aspr.ms.util.wrappers; public final class MutableBoolean { private boolean value; diff --git a/src/main/java/util/wrappers/MutableDouble.java b/src/main/java/gov/hhs/aspr/ms/util/wrappers/MutableDouble.java similarity index 98% rename from src/main/java/util/wrappers/MutableDouble.java rename to src/main/java/gov/hhs/aspr/ms/util/wrappers/MutableDouble.java index a130aeb..d461b8a 100644 --- a/src/main/java/util/wrappers/MutableDouble.java +++ b/src/main/java/gov/hhs/aspr/ms/util/wrappers/MutableDouble.java @@ -1,4 +1,4 @@ -package util.wrappers; +package gov.hhs.aspr.ms.util.wrappers; public final class MutableDouble { private double value; diff --git a/src/main/java/util/wrappers/MutableInteger.java b/src/main/java/gov/hhs/aspr/ms/util/wrappers/MutableInteger.java similarity index 97% rename from src/main/java/util/wrappers/MutableInteger.java rename to src/main/java/gov/hhs/aspr/ms/util/wrappers/MutableInteger.java index 3b9e342..c1a9b30 100644 --- a/src/main/java/util/wrappers/MutableInteger.java +++ b/src/main/java/gov/hhs/aspr/ms/util/wrappers/MutableInteger.java @@ -1,4 +1,4 @@ -package util.wrappers; +package gov.hhs.aspr.ms.util.wrappers; public final class MutableInteger { private int value; diff --git a/src/main/java/util/wrappers/MutableLong.java b/src/main/java/gov/hhs/aspr/ms/util/wrappers/MutableLong.java similarity index 97% rename from src/main/java/util/wrappers/MutableLong.java rename to src/main/java/gov/hhs/aspr/ms/util/wrappers/MutableLong.java index 3a02c92..2d9e18d 100644 --- a/src/main/java/util/wrappers/MutableLong.java +++ b/src/main/java/gov/hhs/aspr/ms/util/wrappers/MutableLong.java @@ -1,4 +1,4 @@ -package util.wrappers; +package gov.hhs.aspr.ms.util.wrappers; public final class MutableLong { private long value; diff --git a/src/main/java/util/wrappers/MutableObject.java b/src/main/java/gov/hhs/aspr/ms/util/wrappers/MutableObject.java similarity index 97% rename from src/main/java/util/wrappers/MutableObject.java rename to src/main/java/gov/hhs/aspr/ms/util/wrappers/MutableObject.java index b490463..eac2e3b 100644 --- a/src/main/java/util/wrappers/MutableObject.java +++ b/src/main/java/gov/hhs/aspr/ms/util/wrappers/MutableObject.java @@ -1,4 +1,4 @@ -package util.wrappers; +package gov.hhs.aspr.ms.util.wrappers; public final class MutableObject { private T value; diff --git a/src/test/java/tools/MetaInfoReportRunner.java b/src/test/java/gov/hhs/aspr/ms/tools/MetaInfoReportRunner.java similarity index 51% rename from src/test/java/tools/MetaInfoReportRunner.java rename to src/test/java/gov/hhs/aspr/ms/tools/MetaInfoReportRunner.java index b627ca8..7b6c8bb 100644 --- a/src/test/java/tools/MetaInfoReportRunner.java +++ b/src/test/java/gov/hhs/aspr/ms/tools/MetaInfoReportRunner.java @@ -1,6 +1,6 @@ -package tools; +package gov.hhs.aspr.ms.tools; -import util.meta.unittestcoverage.reports.MetaInfoReport; +import gov.hhs.aspr.ms.util.meta.unittestcoverage.reports.MetaInfoReport; public class MetaInfoReportRunner { public static void main(String[] args) { diff --git a/src/test/java/util/combinatorics/AT_TupleGenerator.java b/src/test/java/gov/hhs/aspr/ms/util/combinatorics/AT_TupleGenerator.java similarity index 97% rename from src/test/java/util/combinatorics/AT_TupleGenerator.java rename to src/test/java/gov/hhs/aspr/ms/util/combinatorics/AT_TupleGenerator.java index 09fb146..e3d8af6 100644 --- a/src/test/java/util/combinatorics/AT_TupleGenerator.java +++ b/src/test/java/gov/hhs/aspr/ms/util/combinatorics/AT_TupleGenerator.java @@ -1,4 +1,4 @@ -package util.combinatorics; +package gov.hhs.aspr.ms.util.combinatorics; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -12,8 +12,8 @@ import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; public class AT_TupleGenerator { diff --git a/src/test/java/util/delaunay/AT_GeoDelaunaySolver.java b/src/test/java/gov/hhs/aspr/ms/util/delaunay/AT_GeoDelaunaySolver.java similarity index 72% rename from src/test/java/util/delaunay/AT_GeoDelaunaySolver.java rename to src/test/java/gov/hhs/aspr/ms/util/delaunay/AT_GeoDelaunaySolver.java index 3ed7b0a..3447246 100644 --- a/src/test/java/util/delaunay/AT_GeoDelaunaySolver.java +++ b/src/test/java/gov/hhs/aspr/ms/util/delaunay/AT_GeoDelaunaySolver.java @@ -1,11 +1,11 @@ -package util.delaunay; +package gov.hhs.aspr.ms.util.delaunay; import java.util.Map; import org.junit.jupiter.api.Test; -import util.annotations.UnitTag; -import util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.annotations.UnitTag; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; public class AT_GeoDelaunaySolver { diff --git a/src/test/java/util/delaunay/AT_PlanarDelaunaySolver.java b/src/test/java/gov/hhs/aspr/ms/util/delaunay/AT_PlanarDelaunaySolver.java similarity index 72% rename from src/test/java/util/delaunay/AT_PlanarDelaunaySolver.java rename to src/test/java/gov/hhs/aspr/ms/util/delaunay/AT_PlanarDelaunaySolver.java index ad56b96..7596fea 100644 --- a/src/test/java/util/delaunay/AT_PlanarDelaunaySolver.java +++ b/src/test/java/gov/hhs/aspr/ms/util/delaunay/AT_PlanarDelaunaySolver.java @@ -1,11 +1,11 @@ -package util.delaunay; +package gov.hhs.aspr.ms.util.delaunay; import java.util.Map; import org.junit.jupiter.api.Test; -import util.annotations.UnitTag; -import util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.annotations.UnitTag; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; public class AT_PlanarDelaunaySolver { diff --git a/src/test/java/util/delaunay/geovisualizer/GeoVisualizerDriver.java b/src/test/java/gov/hhs/aspr/ms/util/delaunay/geovisualizer/GeoVisualizerDriver.java similarity index 90% rename from src/test/java/util/delaunay/geovisualizer/GeoVisualizerDriver.java rename to src/test/java/gov/hhs/aspr/ms/util/delaunay/geovisualizer/GeoVisualizerDriver.java index a984a94..5a2ef58 100644 --- a/src/test/java/util/delaunay/geovisualizer/GeoVisualizerDriver.java +++ b/src/test/java/gov/hhs/aspr/ms/util/delaunay/geovisualizer/GeoVisualizerDriver.java @@ -1,4 +1,4 @@ -package util.delaunay.geovisualizer; +package gov.hhs.aspr.ms.util.delaunay.geovisualizer; import java.io.IOException; import java.nio.file.Files; @@ -10,9 +10,9 @@ import org.apache.commons.math3.util.Pair; -import util.delaunay.GeoDelaunaySolver; -import util.earth.LatLon; -import util.time.TimeElapser; +import gov.hhs.aspr.ms.util.delaunay.GeoDelaunaySolver; +import gov.hhs.aspr.ms.util.time.TimeElapser; +import gov.hhs.aspr.ms.util.earth.LatLon; /** * A demonstration application driver that displays population data consisting diff --git a/src/test/java/util/delaunay/geovisualizer/GeoVisualizerPanel.java b/src/test/java/gov/hhs/aspr/ms/util/delaunay/geovisualizer/GeoVisualizerPanel.java similarity index 97% rename from src/test/java/util/delaunay/geovisualizer/GeoVisualizerPanel.java rename to src/test/java/gov/hhs/aspr/ms/util/delaunay/geovisualizer/GeoVisualizerPanel.java index 65beae4..c308169 100644 --- a/src/test/java/util/delaunay/geovisualizer/GeoVisualizerPanel.java +++ b/src/test/java/gov/hhs/aspr/ms/util/delaunay/geovisualizer/GeoVisualizerPanel.java @@ -1,4 +1,4 @@ -package util.delaunay.geovisualizer; +package gov.hhs.aspr.ms.util.delaunay.geovisualizer; import java.awt.BasicStroke; import java.awt.Color; @@ -30,16 +30,16 @@ import org.apache.commons.math3.util.FastMath; import org.apache.commons.math3.util.Pair; -import util.dimensiontree.DimensionTree; -import util.earth.Earth; -import util.earth.LatLon; -import util.earth.LatLonAlt; -import util.graph.Graph; -import util.path.Path; -import util.path.Paths; -import util.time.TimeElapser; -import util.vector.MutableVector3D; -import util.vector.Vector3D; +import gov.hhs.aspr.ms.util.dimensiontree.DimensionTree; +import gov.hhs.aspr.ms.util.earth.Earth; +import gov.hhs.aspr.ms.util.earth.LatLonAlt; +import gov.hhs.aspr.ms.util.graph.Graph; +import gov.hhs.aspr.ms.util.path.Path; +import gov.hhs.aspr.ms.util.path.Paths; +import gov.hhs.aspr.ms.util.time.TimeElapser; +import gov.hhs.aspr.ms.util.vector.MutableVector3D; +import gov.hhs.aspr.ms.util.vector.Vector3D; +import gov.hhs.aspr.ms.util.earth.LatLon; public class GeoVisualizerPanel extends JPanel { diff --git a/src/test/java/util/delaunay/geovisualizer/GeoVisualzerFrame.java b/src/test/java/gov/hhs/aspr/ms/util/delaunay/geovisualizer/GeoVisualzerFrame.java similarity index 88% rename from src/test/java/util/delaunay/geovisualizer/GeoVisualzerFrame.java rename to src/test/java/gov/hhs/aspr/ms/util/delaunay/geovisualizer/GeoVisualzerFrame.java index 1d917a3..7485efb 100644 --- a/src/test/java/util/delaunay/geovisualizer/GeoVisualzerFrame.java +++ b/src/test/java/gov/hhs/aspr/ms/util/delaunay/geovisualizer/GeoVisualzerFrame.java @@ -1,4 +1,4 @@ -package util.delaunay.geovisualizer; +package gov.hhs.aspr.ms.util.delaunay.geovisualizer; import java.awt.Frame; import java.util.List; @@ -8,7 +8,7 @@ import org.apache.commons.math3.util.Pair; -import util.earth.LatLon; +import gov.hhs.aspr.ms.util.earth.LatLon; public class GeoVisualzerFrame extends JFrame { private static final long serialVersionUID = -5106781364986923139L; diff --git a/src/test/java/util/delaunay/planarvisualizer/PlanarVisualizerDriver.java b/src/test/java/gov/hhs/aspr/ms/util/delaunay/planarvisualizer/PlanarVisualizerDriver.java similarity index 81% rename from src/test/java/util/delaunay/planarvisualizer/PlanarVisualizerDriver.java rename to src/test/java/gov/hhs/aspr/ms/util/delaunay/planarvisualizer/PlanarVisualizerDriver.java index 1384e49..40095ab 100644 --- a/src/test/java/util/delaunay/planarvisualizer/PlanarVisualizerDriver.java +++ b/src/test/java/gov/hhs/aspr/ms/util/delaunay/planarvisualizer/PlanarVisualizerDriver.java @@ -1,4 +1,4 @@ -package util.delaunay.planarvisualizer; +package gov.hhs.aspr.ms.util.delaunay.planarvisualizer; import java.util.LinkedHashMap; import java.util.List; @@ -7,10 +7,10 @@ import org.apache.commons.math3.random.RandomGenerator; import org.apache.commons.math3.util.Pair; -import util.delaunay.PlanarDelaunaySolver; -import util.random.RandomGeneratorProvider; -import util.time.TimeElapser; -import util.vector.Vector2D; +import gov.hhs.aspr.ms.util.delaunay.PlanarDelaunaySolver; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.time.TimeElapser; +import gov.hhs.aspr.ms.util.vector.Vector2D; /** * A demonstration application driver that displays a randomized set of 5000 diff --git a/src/test/java/util/delaunay/planarvisualizer/PlanarVisualizerPanel.java b/src/test/java/gov/hhs/aspr/ms/util/delaunay/planarvisualizer/PlanarVisualizerPanel.java similarity index 98% rename from src/test/java/util/delaunay/planarvisualizer/PlanarVisualizerPanel.java rename to src/test/java/gov/hhs/aspr/ms/util/delaunay/planarvisualizer/PlanarVisualizerPanel.java index 8a4bc41..749fe24 100644 --- a/src/test/java/util/delaunay/planarvisualizer/PlanarVisualizerPanel.java +++ b/src/test/java/gov/hhs/aspr/ms/util/delaunay/planarvisualizer/PlanarVisualizerPanel.java @@ -1,4 +1,4 @@ -package util.delaunay.planarvisualizer; +package gov.hhs.aspr.ms.util.delaunay.planarvisualizer; import java.awt.BasicStroke; import java.awt.Color; @@ -22,8 +22,8 @@ import org.apache.commons.math3.util.FastMath; import org.apache.commons.math3.util.Pair; -import util.vector.MutableVector2D; -import util.vector.Vector2D; +import gov.hhs.aspr.ms.util.vector.MutableVector2D; +import gov.hhs.aspr.ms.util.vector.Vector2D; public class PlanarVisualizerPanel extends JPanel { private static final long serialVersionUID = -8746718644903555611L; diff --git a/src/test/java/util/delaunay/planarvisualizer/PlanarVisualzerFrame.java b/src/test/java/gov/hhs/aspr/ms/util/delaunay/planarvisualizer/PlanarVisualzerFrame.java similarity index 88% rename from src/test/java/util/delaunay/planarvisualizer/PlanarVisualzerFrame.java rename to src/test/java/gov/hhs/aspr/ms/util/delaunay/planarvisualizer/PlanarVisualzerFrame.java index ecc552b..150f3ab 100644 --- a/src/test/java/util/delaunay/planarvisualizer/PlanarVisualzerFrame.java +++ b/src/test/java/gov/hhs/aspr/ms/util/delaunay/planarvisualizer/PlanarVisualzerFrame.java @@ -1,4 +1,4 @@ -package util.delaunay.planarvisualizer; +package gov.hhs.aspr.ms.util.delaunay.planarvisualizer; import java.awt.Frame; import java.util.List; @@ -8,7 +8,7 @@ import org.apache.commons.math3.util.Pair; -import util.vector.Vector2D; +import gov.hhs.aspr.ms.util.vector.Vector2D; public class PlanarVisualzerFrame extends JFrame { private static final long serialVersionUID = -5106781364986923139L; diff --git a/src/test/java/util/dimensiontree/AT_DimensionTree.java b/src/test/java/gov/hhs/aspr/ms/util/dimensiontree/AT_DimensionTree.java similarity index 98% rename from src/test/java/util/dimensiontree/AT_DimensionTree.java rename to src/test/java/gov/hhs/aspr/ms/util/dimensiontree/AT_DimensionTree.java index f2bd197..b9885c0 100644 --- a/src/test/java/util/dimensiontree/AT_DimensionTree.java +++ b/src/test/java/gov/hhs/aspr/ms/util/dimensiontree/AT_DimensionTree.java @@ -1,4 +1,4 @@ -package util.dimensiontree; +package gov.hhs.aspr.ms.util.dimensiontree; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -18,10 +18,10 @@ import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Test; -import util.annotations.UnitTag; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; -import util.time.TimeElapser; +import gov.hhs.aspr.ms.util.annotations.UnitTag; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.time.TimeElapser; diff --git a/src/test/java/util/dimensiontree/AT_DimensionTreeError.java b/src/test/java/gov/hhs/aspr/ms/util/dimensiontree/AT_DimensionTreeError.java similarity index 90% rename from src/test/java/util/dimensiontree/AT_DimensionTreeError.java rename to src/test/java/gov/hhs/aspr/ms/util/dimensiontree/AT_DimensionTreeError.java index 9c02da7..bd935d7 100644 --- a/src/test/java/util/dimensiontree/AT_DimensionTreeError.java +++ b/src/test/java/gov/hhs/aspr/ms/util/dimensiontree/AT_DimensionTreeError.java @@ -1,4 +1,4 @@ -package util.dimensiontree; +package gov.hhs.aspr.ms.util.dimensiontree; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test; -import util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; public class AT_DimensionTreeError { diff --git a/src/test/java/util/dimensiontree/AT_VolumetricDimensionTree.java b/src/test/java/gov/hhs/aspr/ms/util/dimensiontree/AT_VolumetricDimensionTree.java similarity index 98% rename from src/test/java/util/dimensiontree/AT_VolumetricDimensionTree.java rename to src/test/java/gov/hhs/aspr/ms/util/dimensiontree/AT_VolumetricDimensionTree.java index 672986b..1212a76 100644 --- a/src/test/java/util/dimensiontree/AT_VolumetricDimensionTree.java +++ b/src/test/java/gov/hhs/aspr/ms/util/dimensiontree/AT_VolumetricDimensionTree.java @@ -1,4 +1,4 @@ -package util.dimensiontree; +package gov.hhs.aspr.ms.util.dimensiontree; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -13,10 +13,10 @@ import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; -import util.annotations.UnitTag; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; -import util.vector.Vector2D; +import gov.hhs.aspr.ms.util.annotations.UnitTag; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.vector.Vector2D; public class AT_VolumetricDimensionTree { diff --git a/src/test/java/util/earth/AT_Earth.java b/src/test/java/gov/hhs/aspr/ms/util/earth/AT_Earth.java similarity index 98% rename from src/test/java/util/earth/AT_Earth.java rename to src/test/java/gov/hhs/aspr/ms/util/earth/AT_Earth.java index e7eae08..2f783f0 100644 --- a/src/test/java/util/earth/AT_Earth.java +++ b/src/test/java/gov/hhs/aspr/ms/util/earth/AT_Earth.java @@ -1,4 +1,4 @@ -package util.earth; +package gov.hhs.aspr.ms.util.earth; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -9,10 +9,10 @@ import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestField; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; -import util.vector.Vector3D; +import gov.hhs.aspr.ms.util.annotations.UnitTestField; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.vector.Vector3D; public class AT_Earth { diff --git a/src/test/java/util/earth/AT_EarthGrid.java b/src/test/java/gov/hhs/aspr/ms/util/earth/AT_EarthGrid.java similarity index 79% rename from src/test/java/util/earth/AT_EarthGrid.java rename to src/test/java/gov/hhs/aspr/ms/util/earth/AT_EarthGrid.java index 0b33e75..2c8e326 100644 --- a/src/test/java/util/earth/AT_EarthGrid.java +++ b/src/test/java/gov/hhs/aspr/ms/util/earth/AT_EarthGrid.java @@ -1,15 +1,15 @@ -package util.earth; +package gov.hhs.aspr.ms.util.earth; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import org.junit.jupiter.api.Test; -import util.annotations.UnitTag; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestField; -import util.annotations.UnitTestMethod; -import util.vector.Vector2D; +import gov.hhs.aspr.ms.util.annotations.UnitTag; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestField; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.vector.Vector2D; public class AT_EarthGrid { diff --git a/src/test/java/util/earth/AT_LatLon.java b/src/test/java/gov/hhs/aspr/ms/util/earth/AT_LatLon.java similarity index 96% rename from src/test/java/util/earth/AT_LatLon.java rename to src/test/java/gov/hhs/aspr/ms/util/earth/AT_LatLon.java index 6258f56..dc45562 100644 --- a/src/test/java/util/earth/AT_LatLon.java +++ b/src/test/java/gov/hhs/aspr/ms/util/earth/AT_LatLon.java @@ -1,4 +1,4 @@ -package util.earth; +package gov.hhs.aspr.ms.util.earth; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -6,9 +6,9 @@ import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; public class AT_LatLon { diff --git a/src/test/java/util/earth/AT_LatLonAlt.java b/src/test/java/gov/hhs/aspr/ms/util/earth/AT_LatLonAlt.java similarity index 97% rename from src/test/java/util/earth/AT_LatLonAlt.java rename to src/test/java/gov/hhs/aspr/ms/util/earth/AT_LatLonAlt.java index 987a6ae..7a96ed9 100644 --- a/src/test/java/util/earth/AT_LatLonAlt.java +++ b/src/test/java/gov/hhs/aspr/ms/util/earth/AT_LatLonAlt.java @@ -1,4 +1,4 @@ -package util.earth; +package gov.hhs.aspr.ms.util.earth; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -6,10 +6,10 @@ import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; -import util.vector.Vector3D; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.vector.Vector3D; public class AT_LatLonAlt { diff --git a/src/test/java/util/errors/AT_ContractException.java b/src/test/java/gov/hhs/aspr/ms/util/errors/AT_ContractException.java similarity index 90% rename from src/test/java/util/errors/AT_ContractException.java rename to src/test/java/gov/hhs/aspr/ms/util/errors/AT_ContractException.java index 65eb188..14829cf 100644 --- a/src/test/java/util/errors/AT_ContractException.java +++ b/src/test/java/gov/hhs/aspr/ms/util/errors/AT_ContractException.java @@ -1,13 +1,13 @@ -package util.errors; +package gov.hhs.aspr.ms.util.errors; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import org.junit.jupiter.api.Test; -import util.annotations.UnitTag; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.annotations.UnitTag; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; public class AT_ContractException { diff --git a/src/test/java/util/geolocator/AT_GeoLocator.java b/src/test/java/gov/hhs/aspr/ms/util/geolocator/AT_GeoLocator.java similarity index 94% rename from src/test/java/util/geolocator/AT_GeoLocator.java rename to src/test/java/gov/hhs/aspr/ms/util/geolocator/AT_GeoLocator.java index 73f4813..fd4ae16 100644 --- a/src/test/java/util/geolocator/AT_GeoLocator.java +++ b/src/test/java/gov/hhs/aspr/ms/util/geolocator/AT_GeoLocator.java @@ -1,4 +1,4 @@ -package util.geolocator; +package gov.hhs.aspr.ms.util.geolocator; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -17,14 +17,14 @@ import org.apache.commons.math3.util.Pair; import org.junit.jupiter.api.Test; -import util.annotations.UnitTag; -import util.annotations.UnitTestMethod; -import util.earth.Earth; -import util.earth.LatLon; -import util.earth.LatLonAlt; -import util.geolocator.GeoLocator.Builder; -import util.random.RandomGeneratorProvider; -import util.vector.Vector3D; +import gov.hhs.aspr.ms.util.annotations.UnitTag; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.earth.Earth; +import gov.hhs.aspr.ms.util.earth.LatLonAlt; +import gov.hhs.aspr.ms.util.geolocator.GeoLocator.Builder; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.vector.Vector3D; +import gov.hhs.aspr.ms.util.earth.LatLon; public class AT_GeoLocator { diff --git a/src/test/java/util/graph/AT_Graph.java b/src/test/java/gov/hhs/aspr/ms/util/graph/AT_Graph.java similarity index 99% rename from src/test/java/util/graph/AT_Graph.java rename to src/test/java/gov/hhs/aspr/ms/util/graph/AT_Graph.java index 494991c..fa5cd71 100644 --- a/src/test/java/util/graph/AT_Graph.java +++ b/src/test/java/gov/hhs/aspr/ms/util/graph/AT_Graph.java @@ -1,4 +1,4 @@ -package util.graph; +package gov.hhs.aspr.ms.util.graph; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -11,8 +11,8 @@ import org.junit.jupiter.api.Test; -import util.annotations.UnitTag; -import util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.annotations.UnitTag; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; public class AT_Graph { diff --git a/src/test/java/util/graph/AT_GraphDepthEvaluator.java b/src/test/java/gov/hhs/aspr/ms/util/graph/AT_GraphDepthEvaluator.java similarity index 98% rename from src/test/java/util/graph/AT_GraphDepthEvaluator.java rename to src/test/java/gov/hhs/aspr/ms/util/graph/AT_GraphDepthEvaluator.java index 3591d0a..691b926 100644 --- a/src/test/java/util/graph/AT_GraphDepthEvaluator.java +++ b/src/test/java/gov/hhs/aspr/ms/util/graph/AT_GraphDepthEvaluator.java @@ -1,4 +1,4 @@ -package util.graph; +package gov.hhs.aspr.ms.util.graph; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -12,7 +12,7 @@ import org.junit.jupiter.api.Test; -import util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; public class AT_GraphDepthEvaluator { diff --git a/src/test/java/util/graph/AT_Graphs.java b/src/test/java/gov/hhs/aspr/ms/util/graph/AT_Graphs.java similarity index 98% rename from src/test/java/util/graph/AT_Graphs.java rename to src/test/java/gov/hhs/aspr/ms/util/graph/AT_Graphs.java index 0badce0..5e931ca 100644 --- a/src/test/java/util/graph/AT_Graphs.java +++ b/src/test/java/gov/hhs/aspr/ms/util/graph/AT_Graphs.java @@ -1,4 +1,4 @@ -package util.graph; +package gov.hhs.aspr.ms.util.graph; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -9,9 +9,9 @@ import org.junit.jupiter.api.Test; -import util.annotations.UnitTestMethod; -import util.graph.Graphs.GraphConnectedness; -import util.graph.Graphs.GraphCyclisity; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.graph.Graphs.GraphConnectedness; +import gov.hhs.aspr.ms.util.graph.Graphs.GraphCyclisity; public class AT_Graphs { diff --git a/src/test/java/util/graph/AT_MutableGraph.java b/src/test/java/gov/hhs/aspr/ms/util/graph/AT_MutableGraph.java similarity index 99% rename from src/test/java/util/graph/AT_MutableGraph.java rename to src/test/java/gov/hhs/aspr/ms/util/graph/AT_MutableGraph.java index b8d2ba0..877837c 100644 --- a/src/test/java/util/graph/AT_MutableGraph.java +++ b/src/test/java/gov/hhs/aspr/ms/util/graph/AT_MutableGraph.java @@ -1,4 +1,4 @@ -package util.graph; +package gov.hhs.aspr.ms.util.graph; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -14,8 +14,8 @@ import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; public class AT_MutableGraph { diff --git a/src/test/java/util/indexer/AT_Indexer2.java b/src/test/java/gov/hhs/aspr/ms/util/indexer/AT_Indexer2.java similarity index 89% rename from src/test/java/util/indexer/AT_Indexer2.java rename to src/test/java/gov/hhs/aspr/ms/util/indexer/AT_Indexer2.java index 1805f0a..b759a90 100644 --- a/src/test/java/util/indexer/AT_Indexer2.java +++ b/src/test/java/gov/hhs/aspr/ms/util/indexer/AT_Indexer2.java @@ -1,4 +1,4 @@ -package util.indexer; +package gov.hhs.aspr.ms.util.indexer; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -7,10 +7,10 @@ import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.errors.ContractException; -import util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.errors.ContractException; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; public class AT_Indexer2 { @Test diff --git a/src/test/java/util/indexer/AT_Indexer3.java b/src/test/java/gov/hhs/aspr/ms/util/indexer/AT_Indexer3.java similarity index 90% rename from src/test/java/util/indexer/AT_Indexer3.java rename to src/test/java/gov/hhs/aspr/ms/util/indexer/AT_Indexer3.java index ec3467e..4b45ce1 100644 --- a/src/test/java/util/indexer/AT_Indexer3.java +++ b/src/test/java/gov/hhs/aspr/ms/util/indexer/AT_Indexer3.java @@ -1,4 +1,4 @@ -package util.indexer; +package gov.hhs.aspr.ms.util.indexer; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -7,10 +7,10 @@ import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.errors.ContractException; -import util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.errors.ContractException; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; public class AT_Indexer3 { @Test diff --git a/src/test/java/util/indexer/AT_Indexer4.java b/src/test/java/gov/hhs/aspr/ms/util/indexer/AT_Indexer4.java similarity index 92% rename from src/test/java/util/indexer/AT_Indexer4.java rename to src/test/java/gov/hhs/aspr/ms/util/indexer/AT_Indexer4.java index 56f743a..5b6a666 100644 --- a/src/test/java/util/indexer/AT_Indexer4.java +++ b/src/test/java/gov/hhs/aspr/ms/util/indexer/AT_Indexer4.java @@ -1,4 +1,4 @@ -package util.indexer; +package gov.hhs.aspr.ms.util.indexer; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -7,10 +7,10 @@ import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.errors.ContractException; -import util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.errors.ContractException; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; public class AT_Indexer4 { @Test diff --git a/src/test/java/util/indexer/AT_Indexer5.java b/src/test/java/gov/hhs/aspr/ms/util/indexer/AT_Indexer5.java similarity index 93% rename from src/test/java/util/indexer/AT_Indexer5.java rename to src/test/java/gov/hhs/aspr/ms/util/indexer/AT_Indexer5.java index 407b3b2..bc632b5 100644 --- a/src/test/java/util/indexer/AT_Indexer5.java +++ b/src/test/java/gov/hhs/aspr/ms/util/indexer/AT_Indexer5.java @@ -1,4 +1,4 @@ -package util.indexer; +package gov.hhs.aspr.ms.util.indexer; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -7,10 +7,10 @@ import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.errors.ContractException; -import util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.errors.ContractException; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; public class AT_Indexer5 { @Test diff --git a/src/test/java/util/indexer/AT_IndexerError.java b/src/test/java/gov/hhs/aspr/ms/util/indexer/AT_IndexerError.java similarity index 91% rename from src/test/java/util/indexer/AT_IndexerError.java rename to src/test/java/gov/hhs/aspr/ms/util/indexer/AT_IndexerError.java index f780f49..5630005 100644 --- a/src/test/java/util/indexer/AT_IndexerError.java +++ b/src/test/java/gov/hhs/aspr/ms/util/indexer/AT_IndexerError.java @@ -1,4 +1,4 @@ -package util.indexer; +package gov.hhs.aspr.ms.util.indexer; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test; -import util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; public class AT_IndexerError { diff --git a/src/test/java/util/path/AT_ArrayPathSolver.java b/src/test/java/gov/hhs/aspr/ms/util/path/AT_ArrayPathSolver.java similarity index 93% rename from src/test/java/util/path/AT_ArrayPathSolver.java rename to src/test/java/gov/hhs/aspr/ms/util/path/AT_ArrayPathSolver.java index d7a160f..18d0bac 100644 --- a/src/test/java/util/path/AT_ArrayPathSolver.java +++ b/src/test/java/gov/hhs/aspr/ms/util/path/AT_ArrayPathSolver.java @@ -1,4 +1,4 @@ -package util.path; +package gov.hhs.aspr.ms.util.path; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -11,12 +11,12 @@ import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.graph.Graph; -import util.path.Paths.EdgeCostEvaluator; -import util.path.Paths.TravelCostEvaluator; -import util.vector.Vector2D; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.graph.Graph; +import gov.hhs.aspr.ms.util.path.Paths.EdgeCostEvaluator; +import gov.hhs.aspr.ms.util.path.Paths.TravelCostEvaluator; +import gov.hhs.aspr.ms.util.vector.Vector2D; public class AT_ArrayPathSolver { /* diff --git a/src/test/java/util/path/AT_MapPathSolver.java b/src/test/java/gov/hhs/aspr/ms/util/path/AT_MapPathSolver.java similarity index 93% rename from src/test/java/util/path/AT_MapPathSolver.java rename to src/test/java/gov/hhs/aspr/ms/util/path/AT_MapPathSolver.java index bffc54f..e3dea82 100644 --- a/src/test/java/util/path/AT_MapPathSolver.java +++ b/src/test/java/gov/hhs/aspr/ms/util/path/AT_MapPathSolver.java @@ -1,4 +1,4 @@ -package util.path; +package gov.hhs.aspr.ms.util.path; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -11,12 +11,12 @@ import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.graph.Graph; -import util.path.Paths.EdgeCostEvaluator; -import util.path.Paths.TravelCostEvaluator; -import util.vector.Vector2D; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.graph.Graph; +import gov.hhs.aspr.ms.util.path.Paths.EdgeCostEvaluator; +import gov.hhs.aspr.ms.util.path.Paths.TravelCostEvaluator; +import gov.hhs.aspr.ms.util.vector.Vector2D; public class AT_MapPathSolver { /* diff --git a/src/test/java/util/path/AT_Path.java b/src/test/java/gov/hhs/aspr/ms/util/path/AT_Path.java similarity index 97% rename from src/test/java/util/path/AT_Path.java rename to src/test/java/gov/hhs/aspr/ms/util/path/AT_Path.java index 6fbc45d..3f56c78 100644 --- a/src/test/java/util/path/AT_Path.java +++ b/src/test/java/gov/hhs/aspr/ms/util/path/AT_Path.java @@ -1,4 +1,4 @@ -package util.path; +package gov.hhs.aspr.ms.util.path; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -11,7 +11,7 @@ import org.junit.jupiter.api.Test; -import util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; public class AT_Path { diff --git a/src/test/java/util/path/AT_Paths.java b/src/test/java/gov/hhs/aspr/ms/util/path/AT_Paths.java similarity index 94% rename from src/test/java/util/path/AT_Paths.java rename to src/test/java/gov/hhs/aspr/ms/util/path/AT_Paths.java index 4b89bba..9c09b2a 100644 --- a/src/test/java/util/path/AT_Paths.java +++ b/src/test/java/gov/hhs/aspr/ms/util/path/AT_Paths.java @@ -1,4 +1,4 @@ -package util.path; +package gov.hhs.aspr.ms.util.path; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -10,11 +10,11 @@ import org.junit.jupiter.api.Test; -import util.annotations.UnitTestMethod; -import util.graph.Graph; -import util.path.Paths.EdgeCostEvaluator; -import util.path.Paths.TravelCostEvaluator; -import util.vector.Vector2D; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.graph.Graph; +import gov.hhs.aspr.ms.util.path.Paths.EdgeCostEvaluator; +import gov.hhs.aspr.ms.util.path.Paths.TravelCostEvaluator; +import gov.hhs.aspr.ms.util.vector.Vector2D; public class AT_Paths { diff --git a/src/test/java/util/random/AT_RandomGeneratorProvider.java b/src/test/java/gov/hhs/aspr/ms/util/random/AT_RandomGeneratorProvider.java similarity index 92% rename from src/test/java/util/random/AT_RandomGeneratorProvider.java rename to src/test/java/gov/hhs/aspr/ms/util/random/AT_RandomGeneratorProvider.java index e0b01eb..ebd345d 100644 --- a/src/test/java/util/random/AT_RandomGeneratorProvider.java +++ b/src/test/java/gov/hhs/aspr/ms/util/random/AT_RandomGeneratorProvider.java @@ -1,4 +1,4 @@ -package util.random; +package gov.hhs.aspr.ms.util.random; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -10,7 +10,7 @@ import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; public class AT_RandomGeneratorProvider { diff --git a/src/test/java/util/resourcehelper/AT_TestResourceHelper.java b/src/test/java/gov/hhs/aspr/ms/util/resourcehelper/AT_TestResourceHelper.java similarity index 97% rename from src/test/java/util/resourcehelper/AT_TestResourceHelper.java rename to src/test/java/gov/hhs/aspr/ms/util/resourcehelper/AT_TestResourceHelper.java index c56a608..0a707e9 100644 --- a/src/test/java/util/resourcehelper/AT_TestResourceHelper.java +++ b/src/test/java/gov/hhs/aspr/ms/util/resourcehelper/AT_TestResourceHelper.java @@ -1,4 +1,4 @@ -package util.resourcehelper; +package gov.hhs.aspr.ms.util.resourcehelper; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -13,7 +13,7 @@ import org.junit.jupiter.api.Test; -import util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; public class AT_TestResourceHelper { diff --git a/src/test/java/util/spherical/AT_MalformedSphericalArcException.java b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_MalformedSphericalArcException.java similarity index 90% rename from src/test/java/util/spherical/AT_MalformedSphericalArcException.java rename to src/test/java/gov/hhs/aspr/ms/util/spherical/AT_MalformedSphericalArcException.java index 2adbe49..0c40d4b 100644 --- a/src/test/java/util/spherical/AT_MalformedSphericalArcException.java +++ b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_MalformedSphericalArcException.java @@ -1,11 +1,11 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; public class AT_MalformedSphericalArcException { @Test diff --git a/src/test/java/util/spherical/AT_MalformedSphericalPointException.java b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_MalformedSphericalPointException.java similarity index 91% rename from src/test/java/util/spherical/AT_MalformedSphericalPointException.java rename to src/test/java/gov/hhs/aspr/ms/util/spherical/AT_MalformedSphericalPointException.java index 4f05e4a..eba3c08 100644 --- a/src/test/java/util/spherical/AT_MalformedSphericalPointException.java +++ b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_MalformedSphericalPointException.java @@ -1,11 +1,11 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; public class AT_MalformedSphericalPointException { @Test diff --git a/src/test/java/util/spherical/AT_MalformedSphericalPolygonException.java b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_MalformedSphericalPolygonException.java similarity index 91% rename from src/test/java/util/spherical/AT_MalformedSphericalPolygonException.java rename to src/test/java/gov/hhs/aspr/ms/util/spherical/AT_MalformedSphericalPolygonException.java index 92e027c..584ee3f 100644 --- a/src/test/java/util/spherical/AT_MalformedSphericalPolygonException.java +++ b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_MalformedSphericalPolygonException.java @@ -1,11 +1,11 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; public class AT_MalformedSphericalPolygonException { @Test diff --git a/src/test/java/util/spherical/AT_MalformedSphericalTriangleException.java b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_MalformedSphericalTriangleException.java similarity index 91% rename from src/test/java/util/spherical/AT_MalformedSphericalTriangleException.java rename to src/test/java/gov/hhs/aspr/ms/util/spherical/AT_MalformedSphericalTriangleException.java index a671b45..909721c 100644 --- a/src/test/java/util/spherical/AT_MalformedSphericalTriangleException.java +++ b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_MalformedSphericalTriangleException.java @@ -1,11 +1,11 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; public class AT_MalformedSphericalTriangleException { @Test diff --git a/src/test/java/util/spherical/AT_SphericalArc.java b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_SphericalArc.java similarity index 98% rename from src/test/java/util/spherical/AT_SphericalArc.java rename to src/test/java/gov/hhs/aspr/ms/util/spherical/AT_SphericalArc.java index 8cd1178..1ad70b3 100644 --- a/src/test/java/util/spherical/AT_SphericalArc.java +++ b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_SphericalArc.java @@ -1,4 +1,4 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -9,10 +9,10 @@ import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; -import util.vector.Vector3D; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.vector.Vector3D; public class AT_SphericalArc { diff --git a/src/test/java/util/spherical/AT_SphericalPoint.java b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_SphericalPoint.java similarity index 92% rename from src/test/java/util/spherical/AT_SphericalPoint.java rename to src/test/java/gov/hhs/aspr/ms/util/spherical/AT_SphericalPoint.java index 3c04378..ea9e9e7 100644 --- a/src/test/java/util/spherical/AT_SphericalPoint.java +++ b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_SphericalPoint.java @@ -1,4 +1,4 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -8,11 +8,11 @@ import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; -import util.vector.MutableVector3D; -import util.vector.Vector3D; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.vector.MutableVector3D; +import gov.hhs.aspr.ms.util.vector.Vector3D; public class AT_SphericalPoint { diff --git a/src/test/java/util/spherical/AT_SphericalPolygon.java b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_SphericalPolygon.java similarity index 98% rename from src/test/java/util/spherical/AT_SphericalPolygon.java rename to src/test/java/gov/hhs/aspr/ms/util/spherical/AT_SphericalPolygon.java index 20be977..fd61bed 100644 --- a/src/test/java/util/spherical/AT_SphericalPolygon.java +++ b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_SphericalPolygon.java @@ -1,4 +1,4 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -14,12 +14,12 @@ import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Test; -import util.annotations.UnitTag; -import util.annotations.UnitTestMethod; -import util.earth.Earth; -import util.earth.LatLon; -import util.random.RandomGeneratorProvider; -import util.vector.Vector3D; +import gov.hhs.aspr.ms.util.annotations.UnitTag; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.earth.Earth; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.vector.Vector3D; +import gov.hhs.aspr.ms.util.earth.LatLon; public class AT_SphericalPolygon { diff --git a/src/test/java/util/spherical/AT_SphericalTriangle.java b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_SphericalTriangle.java similarity index 98% rename from src/test/java/util/spherical/AT_SphericalTriangle.java rename to src/test/java/gov/hhs/aspr/ms/util/spherical/AT_SphericalTriangle.java index 9c17926..33afe15 100644 --- a/src/test/java/util/spherical/AT_SphericalTriangle.java +++ b/src/test/java/gov/hhs/aspr/ms/util/spherical/AT_SphericalTriangle.java @@ -1,4 +1,4 @@ -package util.spherical; +package gov.hhs.aspr.ms.util.spherical; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -8,10 +8,10 @@ import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; -import util.vector.Vector3D; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.vector.Vector3D; public class AT_SphericalTriangle { diff --git a/src/test/java/util/stats/AT_BinContainer.java b/src/test/java/gov/hhs/aspr/ms/util/stats/AT_BinContainer.java similarity index 96% rename from src/test/java/util/stats/AT_BinContainer.java rename to src/test/java/gov/hhs/aspr/ms/util/stats/AT_BinContainer.java index f395786..092e76f 100644 --- a/src/test/java/util/stats/AT_BinContainer.java +++ b/src/test/java/gov/hhs/aspr/ms/util/stats/AT_BinContainer.java @@ -1,4 +1,4 @@ -package util.stats; +package gov.hhs.aspr.ms.util.stats; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; @@ -9,11 +9,11 @@ import org.junit.jupiter.api.Test; -import util.annotations.UnitTag; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.stats.BinContainer.Bin; -import util.stats.BinContainer.Builder; +import gov.hhs.aspr.ms.util.annotations.UnitTag; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.stats.BinContainer.Bin; +import gov.hhs.aspr.ms.util.stats.BinContainer.Builder; public class AT_BinContainer { /** diff --git a/src/test/java/util/stats/AT_ImmutableStat.java b/src/test/java/gov/hhs/aspr/ms/util/stats/AT_ImmutableStat.java similarity index 98% rename from src/test/java/util/stats/AT_ImmutableStat.java rename to src/test/java/gov/hhs/aspr/ms/util/stats/AT_ImmutableStat.java index 198c3dc..61d82b7 100644 --- a/src/test/java/util/stats/AT_ImmutableStat.java +++ b/src/test/java/gov/hhs/aspr/ms/util/stats/AT_ImmutableStat.java @@ -1,4 +1,4 @@ -package util.stats; +package gov.hhs.aspr.ms.util.stats; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -7,8 +7,8 @@ import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; public class AT_ImmutableStat { diff --git a/src/test/java/util/stats/AT_KahanSum.java b/src/test/java/gov/hhs/aspr/ms/util/stats/AT_KahanSum.java similarity index 91% rename from src/test/java/util/stats/AT_KahanSum.java rename to src/test/java/gov/hhs/aspr/ms/util/stats/AT_KahanSum.java index be2d98f..56c2726 100644 --- a/src/test/java/util/stats/AT_KahanSum.java +++ b/src/test/java/gov/hhs/aspr/ms/util/stats/AT_KahanSum.java @@ -1,4 +1,4 @@ -package util.stats; +package gov.hhs.aspr.ms.util.stats; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -6,9 +6,9 @@ import org.junit.jupiter.api.Test; -import util.annotations.UnitTag; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.annotations.UnitTag; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; public class AT_KahanSum { diff --git a/src/test/java/util/stats/AT_MutableStat.java b/src/test/java/gov/hhs/aspr/ms/util/stats/AT_MutableStat.java similarity index 97% rename from src/test/java/util/stats/AT_MutableStat.java rename to src/test/java/gov/hhs/aspr/ms/util/stats/AT_MutableStat.java index dd8de93..19378cd 100644 --- a/src/test/java/util/stats/AT_MutableStat.java +++ b/src/test/java/gov/hhs/aspr/ms/util/stats/AT_MutableStat.java @@ -1,4 +1,4 @@ -package util.stats; +package gov.hhs.aspr.ms.util.stats; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -13,9 +13,9 @@ import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; public class AT_MutableStat { diff --git a/src/test/java/util/time/AT_Stopwatch.java b/src/test/java/gov/hhs/aspr/ms/util/time/AT_Stopwatch.java similarity index 89% rename from src/test/java/util/time/AT_Stopwatch.java rename to src/test/java/gov/hhs/aspr/ms/util/time/AT_Stopwatch.java index 6f4d5a9..43bf870 100644 --- a/src/test/java/util/time/AT_Stopwatch.java +++ b/src/test/java/gov/hhs/aspr/ms/util/time/AT_Stopwatch.java @@ -1,10 +1,10 @@ -package util.time; +package gov.hhs.aspr.ms.util.time; import org.junit.jupiter.api.Test; -import util.annotations.UnitTag; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.annotations.UnitTag; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; public class AT_Stopwatch { diff --git a/src/test/java/util/time/AT_TimeElapser.java b/src/test/java/gov/hhs/aspr/ms/util/time/AT_TimeElapser.java similarity index 86% rename from src/test/java/util/time/AT_TimeElapser.java rename to src/test/java/gov/hhs/aspr/ms/util/time/AT_TimeElapser.java index 069b0ae..1c51e59 100644 --- a/src/test/java/util/time/AT_TimeElapser.java +++ b/src/test/java/gov/hhs/aspr/ms/util/time/AT_TimeElapser.java @@ -1,9 +1,9 @@ -package util.time; +package gov.hhs.aspr.ms.util.time; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; public class AT_TimeElapser { diff --git a/src/test/java/util/vector/AT_Circle2D.java b/src/test/java/gov/hhs/aspr/ms/util/vector/AT_Circle2D.java similarity index 85% rename from src/test/java/util/vector/AT_Circle2D.java rename to src/test/java/gov/hhs/aspr/ms/util/vector/AT_Circle2D.java index 9ac317f..0707e34 100644 --- a/src/test/java/util/vector/AT_Circle2D.java +++ b/src/test/java/gov/hhs/aspr/ms/util/vector/AT_Circle2D.java @@ -1,13 +1,13 @@ -package util.vector; +package gov.hhs.aspr.ms.util.vector; import java.util.List; import org.junit.jupiter.api.Test; -import util.annotations.UnitTag; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.vector.Circle2D.SolutionAlgorithm; +import gov.hhs.aspr.ms.util.annotations.UnitTag; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.vector.Circle2D.SolutionAlgorithm; public class AT_Circle2D { diff --git a/src/test/java/util/vector/AT_MutableVector2D.java b/src/test/java/gov/hhs/aspr/ms/util/vector/AT_MutableVector2D.java similarity index 99% rename from src/test/java/util/vector/AT_MutableVector2D.java rename to src/test/java/gov/hhs/aspr/ms/util/vector/AT_MutableVector2D.java index c7a1028..2edfb7c 100644 --- a/src/test/java/util/vector/AT_MutableVector2D.java +++ b/src/test/java/gov/hhs/aspr/ms/util/vector/AT_MutableVector2D.java @@ -1,4 +1,4 @@ -package util.vector; +package gov.hhs.aspr.ms.util.vector; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -8,11 +8,11 @@ import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestField; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; -import util.spherical.Chirality; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestField; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.spherical.Chirality; public class AT_MutableVector2D { diff --git a/src/test/java/util/vector/AT_MutableVector3D.java b/src/test/java/gov/hhs/aspr/ms/util/vector/AT_MutableVector3D.java similarity index 99% rename from src/test/java/util/vector/AT_MutableVector3D.java rename to src/test/java/gov/hhs/aspr/ms/util/vector/AT_MutableVector3D.java index 9fc77b8..301e1c1 100644 --- a/src/test/java/util/vector/AT_MutableVector3D.java +++ b/src/test/java/gov/hhs/aspr/ms/util/vector/AT_MutableVector3D.java @@ -1,4 +1,4 @@ -package util.vector; +package gov.hhs.aspr.ms.util.vector; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -8,10 +8,10 @@ import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestField; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestField; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; public class AT_MutableVector3D { diff --git a/src/test/java/util/vector/AT_NonNormalVectorException.java b/src/test/java/gov/hhs/aspr/ms/util/vector/AT_NonNormalVectorException.java similarity index 90% rename from src/test/java/util/vector/AT_NonNormalVectorException.java rename to src/test/java/gov/hhs/aspr/ms/util/vector/AT_NonNormalVectorException.java index 264a146..cd617f5 100644 --- a/src/test/java/util/vector/AT_NonNormalVectorException.java +++ b/src/test/java/gov/hhs/aspr/ms/util/vector/AT_NonNormalVectorException.java @@ -1,11 +1,11 @@ -package util.vector; +package gov.hhs.aspr.ms.util.vector; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; public class AT_NonNormalVectorException { @Test diff --git a/src/test/java/util/vector/AT_Vector2D.java b/src/test/java/gov/hhs/aspr/ms/util/vector/AT_Vector2D.java similarity index 98% rename from src/test/java/util/vector/AT_Vector2D.java rename to src/test/java/gov/hhs/aspr/ms/util/vector/AT_Vector2D.java index b44a5e2..33cb2d2 100644 --- a/src/test/java/util/vector/AT_Vector2D.java +++ b/src/test/java/gov/hhs/aspr/ms/util/vector/AT_Vector2D.java @@ -1,4 +1,4 @@ -package util.vector; +package gov.hhs.aspr.ms.util.vector; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -8,11 +8,11 @@ import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestField; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; -import util.spherical.Chirality; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestField; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.spherical.Chirality; public class AT_Vector2D { diff --git a/src/test/java/util/vector/AT_Vector3D.java b/src/test/java/gov/hhs/aspr/ms/util/vector/AT_Vector3D.java similarity index 99% rename from src/test/java/util/vector/AT_Vector3D.java rename to src/test/java/gov/hhs/aspr/ms/util/vector/AT_Vector3D.java index 9e7c790..8034fa7 100644 --- a/src/test/java/util/vector/AT_Vector3D.java +++ b/src/test/java/gov/hhs/aspr/ms/util/vector/AT_Vector3D.java @@ -1,4 +1,4 @@ -package util.vector; +package gov.hhs.aspr.ms.util.vector; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -8,10 +8,10 @@ import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestField; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestField; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; public class AT_Vector3D { diff --git a/src/test/java/util/vector/MT_Circle2D.java b/src/test/java/gov/hhs/aspr/ms/util/vector/MT_Circle2D.java similarity index 93% rename from src/test/java/util/vector/MT_Circle2D.java rename to src/test/java/gov/hhs/aspr/ms/util/vector/MT_Circle2D.java index 2691959..d6d2e5a 100644 --- a/src/test/java/util/vector/MT_Circle2D.java +++ b/src/test/java/gov/hhs/aspr/ms/util/vector/MT_Circle2D.java @@ -1,4 +1,4 @@ -package util.vector; +package gov.hhs.aspr.ms.util.vector; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -11,9 +11,9 @@ import org.apache.commons.math3.util.FastMath; import org.apache.commons.math3.util.Pair; -import util.delaunay.planarvisualizer.PlanarVisualzerFrame; -import util.random.RandomGeneratorProvider; -import util.vector.Circle2D.SolutionAlgorithm; +import gov.hhs.aspr.ms.util.delaunay.planarvisualizer.PlanarVisualzerFrame; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.vector.Circle2D.SolutionAlgorithm; /** * A manual test class for {@linkplain Circle2D} comparing the performance of diff --git a/src/test/java/util/wrappers/AT_MultiKey.java b/src/test/java/gov/hhs/aspr/ms/util/wrappers/AT_MultiKey.java similarity index 98% rename from src/test/java/util/wrappers/AT_MultiKey.java rename to src/test/java/gov/hhs/aspr/ms/util/wrappers/AT_MultiKey.java index 6d3b326..8b5d18f 100644 --- a/src/test/java/util/wrappers/AT_MultiKey.java +++ b/src/test/java/gov/hhs/aspr/ms/util/wrappers/AT_MultiKey.java @@ -1,4 +1,4 @@ -package util.wrappers; +package gov.hhs.aspr.ms.util.wrappers; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -9,8 +9,8 @@ import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; public class AT_MultiKey { diff --git a/src/test/java/util/wrappers/AT_MutableBoolean.java b/src/test/java/gov/hhs/aspr/ms/util/wrappers/AT_MutableBoolean.java similarity index 93% rename from src/test/java/util/wrappers/AT_MutableBoolean.java rename to src/test/java/gov/hhs/aspr/ms/util/wrappers/AT_MutableBoolean.java index 6ff97e8..10dbf8d 100644 --- a/src/test/java/util/wrappers/AT_MutableBoolean.java +++ b/src/test/java/gov/hhs/aspr/ms/util/wrappers/AT_MutableBoolean.java @@ -1,13 +1,13 @@ -package util.wrappers; +package gov.hhs.aspr.ms.util.wrappers; import static org.junit.jupiter.api.Assertions.assertEquals; import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; public class AT_MutableBoolean { diff --git a/src/test/java/util/wrappers/AT_MutableDouble.java b/src/test/java/gov/hhs/aspr/ms/util/wrappers/AT_MutableDouble.java similarity index 96% rename from src/test/java/util/wrappers/AT_MutableDouble.java rename to src/test/java/gov/hhs/aspr/ms/util/wrappers/AT_MutableDouble.java index d33ceb6..11974fb 100644 --- a/src/test/java/util/wrappers/AT_MutableDouble.java +++ b/src/test/java/gov/hhs/aspr/ms/util/wrappers/AT_MutableDouble.java @@ -1,13 +1,13 @@ -package util.wrappers; +package gov.hhs.aspr.ms.util.wrappers; import static org.junit.jupiter.api.Assertions.assertEquals; import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; public class AT_MutableDouble { diff --git a/src/test/java/util/wrappers/AT_MutableInteger.java b/src/test/java/gov/hhs/aspr/ms/util/wrappers/AT_MutableInteger.java similarity index 96% rename from src/test/java/util/wrappers/AT_MutableInteger.java rename to src/test/java/gov/hhs/aspr/ms/util/wrappers/AT_MutableInteger.java index e101066..7947119 100644 --- a/src/test/java/util/wrappers/AT_MutableInteger.java +++ b/src/test/java/gov/hhs/aspr/ms/util/wrappers/AT_MutableInteger.java @@ -1,13 +1,13 @@ -package util.wrappers; +package gov.hhs.aspr.ms.util.wrappers; import static org.junit.jupiter.api.Assertions.assertEquals; import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; public class AT_MutableInteger { @Test diff --git a/src/test/java/util/wrappers/AT_MutableLong.java b/src/test/java/gov/hhs/aspr/ms/util/wrappers/AT_MutableLong.java similarity index 95% rename from src/test/java/util/wrappers/AT_MutableLong.java rename to src/test/java/gov/hhs/aspr/ms/util/wrappers/AT_MutableLong.java index f4f6e83..bdf4088 100644 --- a/src/test/java/util/wrappers/AT_MutableLong.java +++ b/src/test/java/gov/hhs/aspr/ms/util/wrappers/AT_MutableLong.java @@ -1,13 +1,13 @@ -package util.wrappers; +package gov.hhs.aspr.ms.util.wrappers; import static org.junit.jupiter.api.Assertions.assertEquals; import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; public class AT_MutableLong { diff --git a/src/test/java/util/wrappers/MT_MutableObject.java b/src/test/java/gov/hhs/aspr/ms/util/wrappers/MT_MutableObject.java similarity index 94% rename from src/test/java/util/wrappers/MT_MutableObject.java rename to src/test/java/gov/hhs/aspr/ms/util/wrappers/MT_MutableObject.java index 2334985..9a56bde 100644 --- a/src/test/java/util/wrappers/MT_MutableObject.java +++ b/src/test/java/gov/hhs/aspr/ms/util/wrappers/MT_MutableObject.java @@ -1,4 +1,4 @@ -package util.wrappers; +package gov.hhs.aspr.ms.util.wrappers; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; @@ -6,9 +6,9 @@ import org.apache.commons.math3.random.RandomGenerator; import org.junit.jupiter.api.Test; -import util.annotations.UnitTestConstructor; -import util.annotations.UnitTestMethod; -import util.random.RandomGeneratorProvider; +import gov.hhs.aspr.ms.util.annotations.UnitTestConstructor; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.random.RandomGeneratorProvider; public class MT_MutableObject { From b433120318f5300394336ffcdadcc1cb82b21027 Mon Sep 17 00:00:00 2001 From: Zachary Bischoff <116595361+bischoffz@users.noreply.github.com> Date: Sun, 4 Feb 2024 00:55:56 -0500 Subject: [PATCH 11/30] move path validator (#14) --- .../ms/util/resourcehelper/ResourceError.java | 18 +++ ...esourceHelper.java => ResourceHelper.java} | 34 ++++- .../util/resourcehelper/AT_ResourceError.java | 27 ++++ .../resourcehelper/AT_ResourceHelper.java | 144 ++++++++++++++++++ .../resourcehelper/AT_TestResourceHelper.java | 109 ------------- src/test/resources/resourceHelper.json | 1 + 6 files changed, 222 insertions(+), 111 deletions(-) create mode 100644 src/main/java/gov/hhs/aspr/ms/util/resourcehelper/ResourceError.java rename src/main/java/gov/hhs/aspr/ms/util/resourcehelper/{TestResourceHelper.java => ResourceHelper.java} (55%) create mode 100644 src/test/java/gov/hhs/aspr/ms/util/resourcehelper/AT_ResourceError.java create mode 100644 src/test/java/gov/hhs/aspr/ms/util/resourcehelper/AT_ResourceHelper.java delete mode 100644 src/test/java/gov/hhs/aspr/ms/util/resourcehelper/AT_TestResourceHelper.java create mode 100644 src/test/resources/resourceHelper.json diff --git a/src/main/java/gov/hhs/aspr/ms/util/resourcehelper/ResourceError.java b/src/main/java/gov/hhs/aspr/ms/util/resourcehelper/ResourceError.java new file mode 100644 index 0000000..686d170 --- /dev/null +++ b/src/main/java/gov/hhs/aspr/ms/util/resourcehelper/ResourceError.java @@ -0,0 +1,18 @@ +package gov.hhs.aspr.ms.util.resourcehelper; + +import gov.hhs.aspr.ms.util.errors.ContractError; + +public enum ResourceError implements ContractError { + UNKNOWN_FILE("Provided file does not exist"); + + private final String description; + + private ResourceError(final String description) { + this.description = description; + } + + @Override + public String getDescription() { + return description; + } +} diff --git a/src/main/java/gov/hhs/aspr/ms/util/resourcehelper/TestResourceHelper.java b/src/main/java/gov/hhs/aspr/ms/util/resourcehelper/ResourceHelper.java similarity index 55% rename from src/main/java/gov/hhs/aspr/ms/util/resourcehelper/TestResourceHelper.java rename to src/main/java/gov/hhs/aspr/ms/util/resourcehelper/ResourceHelper.java index 254816e..1757f7b 100644 --- a/src/main/java/gov/hhs/aspr/ms/util/resourcehelper/TestResourceHelper.java +++ b/src/main/java/gov/hhs/aspr/ms/util/resourcehelper/ResourceHelper.java @@ -5,11 +5,14 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URL; +import java.nio.file.Files; import java.nio.file.Path; -public class TestResourceHelper { +import gov.hhs.aspr.ms.util.errors.ContractException; - private TestResourceHelper() { +public class ResourceHelper { + + private ResourceHelper() { } public static Path getResourceDir(Class classRef) { @@ -47,6 +50,32 @@ public static void createOutputFile(Path filePath, String fileName) { createFile(isAfile); } + public static Path validatePath(String path, boolean isOutput) { + Path maybePath = Path.of(path); + File maybeFile = maybePath.toFile(); + + boolean isDirectory = maybeFile.isDirectory(); + boolean isFile = maybeFile.isFile(); + + // if the given string corresponds to a file that exists, return path + if (isFile) { + return maybePath; + } + + // if file does not exist, ensure the path is not a directory and that the + // parent directory of the outputFile exists. + if (isOutput && !isDirectory) { + Path parentPath = maybePath.getParent(); + + if (Files.exists(parentPath)) { + return maybePath; + } + } + + // otherwise throw an exception + throw new ContractException(ResourceError.UNKNOWN_FILE, path); + } + protected static void createFile(File file) { try { file.createNewFile(); @@ -54,4 +83,5 @@ protected static void createFile(File file) { throw new RuntimeException(e); } } + } diff --git a/src/test/java/gov/hhs/aspr/ms/util/resourcehelper/AT_ResourceError.java b/src/test/java/gov/hhs/aspr/ms/util/resourcehelper/AT_ResourceError.java new file mode 100644 index 0000000..170cbee --- /dev/null +++ b/src/test/java/gov/hhs/aspr/ms/util/resourcehelper/AT_ResourceError.java @@ -0,0 +1,27 @@ +package gov.hhs.aspr.ms.util.resourcehelper; + +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.LinkedHashSet; +import java.util.Set; + +import org.junit.jupiter.api.Test; + +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; + +public class AT_ResourceError { + @Test + @UnitTestMethod(target = ResourceError.class, name = "getDescription", args = {}) + public void testGetDescription() { + // show that each description is a unique, non-null and non-empty string + Set descriptions = new LinkedHashSet<>(); + for (ResourceError personBlockError : ResourceError.values()) { + String description = personBlockError.getDescription(); + assertNotNull(description, "null description for " + personBlockError); + assertTrue(description.length() > 0, "empty string for " + personBlockError); + boolean unique = descriptions.add(description); + assertTrue(unique, "description for " + personBlockError + " is not unique"); + } + } +} diff --git a/src/test/java/gov/hhs/aspr/ms/util/resourcehelper/AT_ResourceHelper.java b/src/test/java/gov/hhs/aspr/ms/util/resourcehelper/AT_ResourceHelper.java new file mode 100644 index 0000000..5354b7f --- /dev/null +++ b/src/test/java/gov/hhs/aspr/ms/util/resourcehelper/AT_ResourceHelper.java @@ -0,0 +1,144 @@ +package gov.hhs.aspr.ms.util.resourcehelper; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.file.Path; + +import org.junit.jupiter.api.Test; + +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; +import gov.hhs.aspr.ms.util.errors.ContractException; + +public class AT_ResourceHelper { + + @Test + @UnitTestMethod(target = ResourceHelper.class, name = "getResourceDir", args = { Class.class }) + public void testGetResourceDir() throws MalformedURLException { + Path path = ResourceHelper.getResourceDir(this.getClass()); + + assertNotNull(path); + assertTrue(path.toFile().exists()); + assertTrue(path.resolve("resourceHelper.json").toFile().exists()); + + // preconditions + // bad url syntax + URL url = new URL("file:${my.properties}"); + + RuntimeException runtimeException = assertThrows(RuntimeException.class, () -> { + ResourceHelper.getURI(url); + }); + + assertTrue(runtimeException.getCause() instanceof URISyntaxException); + } + + @Test + @UnitTestMethod(target = ResourceHelper.class, name = "makeOutputDir", args = { Path.class }) + public void testMakeTestOutputDir() { + Path path = ResourceHelper.getResourceDir(this.getClass()).resolve("additional-folder"); + + Path newPath = ResourceHelper.makeOutputDir(path); + + assertNotNull(newPath); + assertTrue(newPath.toFile().exists()); + } + + @Test + @UnitTestMethod(target = ResourceHelper.class, name = "makeOutputDir", args = { Path.class, String.class }) + public void testMakeTestOutputDir_SubDir() { + Path path = ResourceHelper.getResourceDir(this.getClass()).resolve("additional-folder"); + + Path newPath = ResourceHelper.makeOutputDir(path, "subFolder"); + + assertNotNull(newPath); + assertTrue(newPath.toFile().exists()); + } + + private class IOExceptionFile extends File { + + /** + * + */ + private static final long serialVersionUID = 1L; + + public IOExceptionFile(String pathname) { + super(pathname); + } + + public IOExceptionFile(File file) { + super(file, pathSeparator); + } + + @Override + public boolean createNewFile() throws IOException { + + throw new IOException(); + } + + } + + @Test + @UnitTestMethod(target = ResourceHelper.class, name = "createOutputFile", args = { Path.class, + String.class }) + public void testCreateTestOutputFile() throws IOException { + Path path = ResourceHelper.getResourceDir(this.getClass()); + + Path newPath = ResourceHelper.makeOutputDir(path); + + String fileName = "foo.txt"; + ResourceHelper.createOutputFile(newPath, fileName); + + assertTrue(newPath.resolve(fileName).toFile().exists()); + + // test for delete/recreat file if it exists + ResourceHelper.createOutputFile(newPath, fileName); + + // preconditions + // force an IOException + RuntimeException runtimeException = assertThrows(RuntimeException.class, () -> { + IOExceptionFile testFile = new IOExceptionFile(newPath.resolve(fileName).toFile()); + ResourceHelper.createFile(testFile); + }); + + assertTrue(runtimeException.getCause() instanceof IOException); + } + + @Test + @UnitTestMethod(target = ResourceHelper.class, name = "validatePath", args = { String.class, boolean.class }) + public void testValidatePath() { + Path resourceDir = ResourceHelper.getResourceDir(getClass()); + // path is a file that is not output and exists + String path = resourceDir.resolve("resourceHelper.json").toAbsolutePath().toString(); + Path expectedPath = resourceDir.resolve("resourceHelper.json").toAbsolutePath(); + assertEquals(expectedPath, ResourceHelper.validatePath(path, false)); + + // file is an output file that does not exist, but the directory the file + // resides in exists + ResourceHelper.makeOutputDir(resourceDir, "testOutput"); + path = resourceDir.resolve("testOutput").resolve("resourceHelper.json").toAbsolutePath().toString(); + expectedPath = resourceDir.resolve("testOutput").resolve("resourceHelper.json").toAbsolutePath(); + assertEquals(expectedPath, ResourceHelper.validatePath(path, true)); + + // preconditions + // File does not exist and it is not an outputFile + ContractException contractException = assertThrows(ContractException.class, () -> { + ResourceHelper.validatePath("testOutput", false); + }); + + assertEquals(ResourceError.UNKNOWN_FILE, contractException.getErrorType()); + + // is output but parent directory does not exist + contractException = assertThrows(ContractException.class, () -> { + ResourceHelper.validatePath(resourceDir.resolve("nonExistantDir").resolve("file.json").toString(), true); + }); + + assertEquals(ResourceError.UNKNOWN_FILE, contractException.getErrorType()); + } +} diff --git a/src/test/java/gov/hhs/aspr/ms/util/resourcehelper/AT_TestResourceHelper.java b/src/test/java/gov/hhs/aspr/ms/util/resourcehelper/AT_TestResourceHelper.java deleted file mode 100644 index 0a707e9..0000000 --- a/src/test/java/gov/hhs/aspr/ms/util/resourcehelper/AT_TestResourceHelper.java +++ /dev/null @@ -1,109 +0,0 @@ -package gov.hhs.aspr.ms.util.resourcehelper; - -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; - -import java.io.File; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URISyntaxException; -import java.net.URL; -import java.nio.file.Path; - -import org.junit.jupiter.api.Test; - -import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; - -public class AT_TestResourceHelper { - - @Test - @UnitTestMethod(target = TestResourceHelper.class, name = "getResourceDir", args = { Class.class }) - public void testGetResourceDir() throws MalformedURLException { - Path path = TestResourceHelper.getResourceDir(this.getClass()); - - assertNotNull(path); - assertTrue(path.toFile().exists()); - - // preconditions - // bad url syntax - URL url = new URL("file:${my.properties}"); - - RuntimeException runtimeException = assertThrows(RuntimeException.class, () -> { - TestResourceHelper.getURI(url); - }); - - assertTrue(runtimeException.getCause() instanceof URISyntaxException); - } - - @Test - @UnitTestMethod(target = TestResourceHelper.class, name = "makeOutputDir", args = { Path.class }) - public void testMakeTestOutputDir() { - Path path = TestResourceHelper.getResourceDir(this.getClass()).resolve("additional-folder"); - - Path newPath = TestResourceHelper.makeOutputDir(path); - - assertNotNull(newPath); - assertTrue(newPath.toFile().exists()); - } - - @Test - @UnitTestMethod(target = TestResourceHelper.class, name = "makeOutputDir", args = { Path.class, String.class }) - public void testMakeTestOutputDir_SubDir() { - Path path = TestResourceHelper.getResourceDir(this.getClass()).resolve("additional-folder"); - - Path newPath = TestResourceHelper.makeOutputDir(path, "subFolder"); - - assertNotNull(newPath); - assertTrue(newPath.toFile().exists()); - } - - private class IOExceptionFile extends File { - - /** - * - */ - private static final long serialVersionUID = 1L; - - public IOExceptionFile(String pathname) { - super(pathname); - } - - public IOExceptionFile(File file) { - super(file, pathSeparator); - } - - @Override - public boolean createNewFile() throws IOException { - - throw new IOException(); - } - - } - - @Test - @UnitTestMethod(target = TestResourceHelper.class, name = "createOutputFile", args = { Path.class, - String.class }) - public void testCreateTestOutputFile() throws IOException { - Path path = TestResourceHelper.getResourceDir(this.getClass()); - - Path newPath = TestResourceHelper.makeOutputDir(path); - - String fileName = "foo.txt"; - TestResourceHelper.createOutputFile(newPath, fileName); - - assertTrue(newPath.resolve(fileName).toFile().exists()); - - // test for delete/recreat file if it exists - TestResourceHelper.createOutputFile(newPath, fileName); - - // preconditions - // force an IOException - RuntimeException runtimeException = assertThrows(RuntimeException.class, () -> { - IOExceptionFile testFile = new IOExceptionFile(newPath.resolve(fileName).toFile()); - TestResourceHelper.createFile(testFile); - }); - - assertTrue(runtimeException.getCause() instanceof IOException); - } -} diff --git a/src/test/resources/resourceHelper.json b/src/test/resources/resourceHelper.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/src/test/resources/resourceHelper.json @@ -0,0 +1 @@ +{} \ No newline at end of file From 41cee1cfa89d0f7aec0804d2942b333f40ca9a9c Mon Sep 17 00:00:00 2001 From: bischoffz Date: Sun, 4 Feb 2024 02:04:05 -0500 Subject: [PATCH 12/30] update workflows --- .github/workflows/dev_build.yml | 15 ++++----- .github/workflows/pr_build.yml | 32 +++++++++++++++++++ ...e_release_on_tag.yml => release_build.yml} | 18 +++++++---- 3 files changed, 49 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/pr_build.yml rename .github/workflows/{create_release_on_tag.yml => release_build.yml} (86%) diff --git a/.github/workflows/dev_build.yml b/.github/workflows/dev_build.yml index cf423ec..65f62b8 100644 --- a/.github/workflows/dev_build.yml +++ b/.github/workflows/dev_build.yml @@ -11,26 +11,23 @@ name: Development Build on: push: branches: [ "dev" ] - paths: - - '**.xml' - - '**.java' - pull_request: - branches: [ "dev", "main" ] jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout Util - uses: actions/checkout@v3 - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' cache: maven + + - name: Checkout Util + uses: actions/checkout@v4 + - name: Build Util - run: mvn clean package --file pom.xml + run: mvn clean install --file pom.xml # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive # - name: Update dependency graph diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml new file mode 100644 index 0000000..1886d17 --- /dev/null +++ b/.github/workflows/pr_build.yml @@ -0,0 +1,32 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Pull Request Build + +on: [pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + + - name: Checkout Util + uses: actions/checkout@v4 + + - name: Build Util + run: mvn clean install --file pom.xml + + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive + # - name: Update dependency graph + # uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 diff --git a/.github/workflows/create_release_on_tag.yml b/.github/workflows/release_build.yml similarity index 86% rename from .github/workflows/create_release_on_tag.yml rename to .github/workflows/release_build.yml index 6b8891a..b2a690a 100644 --- a/.github/workflows/create_release_on_tag.yml +++ b/.github/workflows/release_build.yml @@ -6,7 +6,7 @@ # separate terms of service, privacy policy, and support # documentation. -name: Create Release +name: Release Build on: push: @@ -20,20 +20,24 @@ jobs: permissions: contents: write steps: - - name: Checkout - uses: actions/checkout@v3 - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' cache: maven - - name: Build + + - name: Checkout Util + uses: actions/checkout@v4 + + - name: Build Util run: mvn clean install -Prelease --file pom.xml - - name: Get Version + + - name: Get Util Version run: | echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV" - - name: Make Release + + - name: Make Util Release uses: ncipollo/release-action@v1 with: artifacts: "target/util-${{ env.version }}.jar,target/util-${{ env.version }}-sources.jar,target/util-${{ env.version }}-javadoc.jar" From 100826be678db5468b0ac420a428aa8c0440b862 Mon Sep 17 00:00:00 2001 From: bischoffz Date: Sun, 4 Feb 2024 02:07:57 -0500 Subject: [PATCH 13/30] update workflows --- .github/workflows/dev_build.yml | 8 ++++---- .github/workflows/pr_build.yml | 26 +++++++++++++------------- .github/workflows/release_build.yml | 8 ++++---- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/dev_build.yml b/.github/workflows/dev_build.yml index 65f62b8..5295194 100644 --- a/.github/workflows/dev_build.yml +++ b/.github/workflows/dev_build.yml @@ -6,7 +6,7 @@ # separate terms of service, privacy policy, and support # documentation. -name: Development Build +name: Util Development Build on: push: @@ -16,6 +16,9 @@ jobs: build: runs-on: ubuntu-latest steps: + - name: Checkout Util + uses: actions/checkout@v4 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: @@ -23,9 +26,6 @@ jobs: distribution: 'temurin' cache: maven - - name: Checkout Util - uses: actions/checkout@v4 - - name: Build Util run: mvn clean install --file pom.xml diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 1886d17..1a12426 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -6,7 +6,7 @@ # separate terms of service, privacy policy, and support # documentation. -name: Pull Request Build +name: Util Pull Request Build on: [pull_request] @@ -14,18 +14,18 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - - name: Checkout Util - uses: actions/checkout@v4 - - - name: Build Util - run: mvn clean install --file pom.xml + - name: Checkout Util + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + + - name: Build Util + run: mvn clean install --file pom.xml # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive # - name: Update dependency graph diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index b2a690a..254acd0 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -6,7 +6,7 @@ # separate terms of service, privacy policy, and support # documentation. -name: Release Build +name: Util Release Build on: push: @@ -20,6 +20,9 @@ jobs: permissions: contents: write steps: + - name: Checkout Util + uses: actions/checkout@v4 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: @@ -27,9 +30,6 @@ jobs: distribution: 'temurin' cache: maven - - name: Checkout Util - uses: actions/checkout@v4 - - name: Build Util run: mvn clean install -Prelease --file pom.xml From d256ef82aa3ab5e21ea0343e9ef6051ec3e6f07e Mon Sep 17 00:00:00 2001 From: Zachary Bischoff <116595361+bischoffz@users.noreply.github.com> Date: Sun, 4 Feb 2024 02:22:56 -0500 Subject: [PATCH 14/30] test-commit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a33c618..2f8de07 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ gov.hhs.aspr.ms util 4.1.0-SNAPSHOT - jar + jar Modeling Utils A suite of utility methods that are useful for simulation frameworks. From 0520dc4141193e26f3800e332e9c1568eca8c729 Mon Sep 17 00:00:00 2001 From: Zachary Bischoff <116595361+bischoffz@users.noreply.github.com> Date: Sun, 4 Feb 2024 02:24:27 -0500 Subject: [PATCH 15/30] Update dev_build.yml --- .github/workflows/dev_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dev_build.yml b/.github/workflows/dev_build.yml index 5295194..e8f9133 100644 --- a/.github/workflows/dev_build.yml +++ b/.github/workflows/dev_build.yml @@ -27,7 +27,7 @@ jobs: cache: maven - name: Build Util - run: mvn clean install --file pom.xml + run: mvn clean package --file pom.xml # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive # - name: Update dependency graph From efc5f3725421d5828825987132454a13a3b606c6 Mon Sep 17 00:00:00 2001 From: Zachary Bischoff <116595361+bischoffz@users.noreply.github.com> Date: Sun, 4 Feb 2024 02:25:01 -0500 Subject: [PATCH 16/30] Update pr_build.yml --- .github/workflows/pr_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 1a12426..d7f633a 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -25,7 +25,7 @@ jobs: cache: maven - name: Build Util - run: mvn clean install --file pom.xml + run: mvn clean package --file pom.xml # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive # - name: Update dependency graph From eda4803e4f01e4a8f8023e7f2f9436f425e12c46 Mon Sep 17 00:00:00 2001 From: bischoffz Date: Sun, 4 Feb 2024 02:27:07 -0500 Subject: [PATCH 17/30] update workflow --- .github/workflows/dev_build.yml | 2 +- .github/workflows/pr_build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev_build.yml b/.github/workflows/dev_build.yml index e8f9133..5295194 100644 --- a/.github/workflows/dev_build.yml +++ b/.github/workflows/dev_build.yml @@ -27,7 +27,7 @@ jobs: cache: maven - name: Build Util - run: mvn clean package --file pom.xml + run: mvn clean install --file pom.xml # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive # - name: Update dependency graph diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index d7f633a..1a12426 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -25,7 +25,7 @@ jobs: cache: maven - name: Build Util - run: mvn clean package --file pom.xml + run: mvn clean install --file pom.xml # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive # - name: Update dependency graph From c63e1d4efbc7d7dd5ea781104ed46200ace71745 Mon Sep 17 00:00:00 2001 From: bischoffz Date: Sun, 4 Feb 2024 02:54:21 -0500 Subject: [PATCH 18/30] update workflows --- .github/workflows/release_build.yml | 4 ++-- .github/workflows/{pr_build.yml => release_pr_build.yml} | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) rename .github/workflows/{pr_build.yml => release_pr_build.yml} (93%) diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index 254acd0..0ec6a4c 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -38,9 +38,9 @@ jobs: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV" - name: Make Util Release - uses: ncipollo/release-action@v1 + uses: ncipollo/release-action@v1.13.0 with: - artifacts: "target/util-${{ env.version }}.jar,target/util-${{ env.version }}-sources.jar,target/util-${{ env.version }}-javadoc.jar" + artifacts: "target/util-${{ env.version }}*.jar" prerelease: ${{ endsWith(env.version, 'SNAPSHOT') || contains(env.version, '-RC') }} name: "v${{ env.version }}" tag: "v${{ env.version }}" diff --git a/.github/workflows/pr_build.yml b/.github/workflows/release_pr_build.yml similarity index 93% rename from .github/workflows/pr_build.yml rename to .github/workflows/release_pr_build.yml index 1a12426..46fbf94 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/release_pr_build.yml @@ -6,9 +6,11 @@ # separate terms of service, privacy policy, and support # documentation. -name: Util Pull Request Build +name: Util Release Pull Request Build -on: [pull_request] +on: + pull_request: + branches: ["main"] jobs: build: From 8d6ac6320de30ee0a4a78a0af004a2b499c4abe4 Mon Sep 17 00:00:00 2001 From: Zachary Bischoff <116595361+bischoffz@users.noreply.github.com> Date: Wed, 7 Feb 2024 01:28:22 -0500 Subject: [PATCH 19/30] add text table reader (#17) --- .../aspr/ms/util/readers/TextTableReader.java | 244 ++++++++++++++++++ .../ms/util/readers/AT_TextTableReader.java | 26 ++ 2 files changed, 270 insertions(+) create mode 100644 src/main/java/gov/hhs/aspr/ms/util/readers/TextTableReader.java create mode 100644 src/test/java/gov/hhs/aspr/ms/util/readers/AT_TextTableReader.java diff --git a/src/main/java/gov/hhs/aspr/ms/util/readers/TextTableReader.java b/src/main/java/gov/hhs/aspr/ms/util/readers/TextTableReader.java new file mode 100644 index 0000000..d454593 --- /dev/null +++ b/src/main/java/gov/hhs/aspr/ms/util/readers/TextTableReader.java @@ -0,0 +1,244 @@ +package gov.hhs.aspr.ms.util.readers; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.nio.file.Path; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Consumer; + +public class TextTableReader { + + private TextTableReader() { + } + + public static void readToMap(String delimeter, String expectedHeader, Path filePath, + Consumer> consumer) { + BufferedReader reader = getReader(filePath); + + // assume headers are correct + String[] expectedHeaders = expectedHeader.split(delimeter); + String[] headers = expectedHeaders; + int expectedHeaderLength = expectedHeaders.length; + int headerLength = expectedHeaderLength; + + String headerLine = expectedHeader; + + boolean headerLineRead = false; + + Map valueMap = new LinkedHashMap<>(); + + for (int i = 0; i < expectedHeaders.length; i++) { + valueMap.put(expectedHeaders[i], ""); + } + + try { + String line; + + long lineNumber = 1; + while ((line = reader.readLine()) != null) { + String[] lineValues = line.split(delimeter); + + if (lineIsCommentLine(lineValues[0], delimeter)) { + lineNumber++; + continue; + } + + if (!headerLineRead) { + if (!expectedHeader.equals(line)) { + // ensure that the actual headers and expected headers contain a union + checkHeadersContainExpectedHeaders(lineValues, expectedHeaders, filePath, reader); + + headerLine = line; + headers = lineValues; + headerLength = lineValues.length; + } + + headerLineRead = true; + lineNumber++; + continue; + } + + // do not allow duplicate header lines + checkDuplicateHeaderLine(line, headerLine, filePath, lineNumber, reader); + + // validate that number of values is equal to the number of headers + validateLineLength(lineValues, headerLength, line, headerLine, filePath, lineNumber, reader); + + for (int i = 0; i < lineValues.length; i++) { + String header = headers[i]; + if (valueMap.containsKey(header)) { + valueMap.put(header, lineValues[i]); + } + } + + consumer.accept(Collections.unmodifiableMap(valueMap)); + lineNumber++; + } + reader.close(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + public static void read(String delimeter, String expectedHeader, Path filePath, Consumer consumer) { + BufferedReader reader = getReader(filePath); + + String[] expectedHeaders = expectedHeader.split(delimeter); + int expectedHeaderLength = expectedHeaders.length; + int headerLength = expectedHeaderLength; + + String headerLine = expectedHeader; + + boolean headerLineRead = false; + boolean headerMatchesExpected = false; + + try { + String line; + // this lookup is only used if the actual header line doesn't match the expected + // header line. So this is safe to do. + int[] headerIndexLookup = new int[0]; + + long lineNumber = 1; + while ((line = reader.readLine()) != null) { + String[] lineValues = line.split(delimeter); + + if (lineIsCommentLine(lineValues[0], delimeter)) { + lineNumber++; + continue; + } + + if (!headerLineRead) { + headerMatchesExpected = expectedHeader.equals(line); + if (!headerMatchesExpected) { + // ensure that the actual headers and expected headers contain a union + checkHeadersContainExpectedHeaders(lineValues, expectedHeaders, filePath, reader); + + headerIndexLookup = processHeaderLine(expectedHeaders, lineValues, delimeter); + headerLine = line; + headerLength = lineValues.length; + } + + headerLineRead = true; + lineNumber++; + continue; + } + + // do not allow duplicate header lines + checkDuplicateHeaderLine(line, headerLine, filePath, lineNumber, reader); + + // validate that number of values is equal to the number of headers + validateLineLength(lineValues, headerLength, line, headerLine, filePath, lineNumber, reader); + + String[] retValues = lineValues; + + if (!headerMatchesExpected) { + retValues = new String[expectedHeaderLength]; + + for (int i = 0; i < lineValues.length; i++) { + int index = headerIndexLookup[i]; + if (index != -1) { + retValues[i] = lineValues[index]; + } + } + } + + consumer.accept(retValues); + lineNumber++; + } + reader.close(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private static void checkHeadersContainExpectedHeaders(String[] headers, String[] expectedHeaders, Path filePath, + BufferedReader reader) throws IOException { + List expectedHeadersList = Arrays.asList(expectedHeaders); + List headersList = Arrays.asList(headers); + + if (!headersList.containsAll(expectedHeadersList)) { + reader.close(); + throw new RuntimeException( + "The actual headers do not contain the set of expected headers. Did you forget to put a header line? File: " + + filePath + " Expected Headers: " + expectedHeadersList.toString() + " Headers: " + + headersList.toString()); + } + } + + private static void checkDuplicateHeaderLine(String line, String headerLine, Path filePath, long lineNumber, + BufferedReader reader) throws IOException { + if (line.equals(headerLine)) { + reader.close(); + throw new RuntimeException("Duplicate header line. File: " + filePath + " Line: " + lineNumber); + } + } + + private static void validateLineLength(String[] lineValues, int headerLength, String line, String headerLine, + Path filePath, long lineNumber, BufferedReader reader) throws IOException { + if (lineValues.length != headerLength) { + reader.close(); + throw new RuntimeException( + "mismatch between values on line and number of headers. Please ensure data integrity. File: " + + filePath + " Line Number: " + lineNumber + " Line contents: " + line + " headers: " + + headerLine + " "); + } + } + + private static BufferedReader getReader(Path filePath) { + try { + return new BufferedReader(new FileReader(filePath.toFile())); + } catch (FileNotFoundException e) { + throw new RuntimeException(e); + } + } + + private static boolean lineIsCommentLine(String value, String delimeter) { + if (value.strip().startsWith("//")) { + return true; + } + + return false; + } + + private static int[] processHeaderLine(String[] expectedHeaders, String[] actualHeaders, String delimeter) { + + int[] headerIndexLookup = new int[actualHeaders.length]; + + for (int i = 0; i < actualHeaders.length; i++) { + headerIndexLookup[i] = -1; + } + + Map headerMapStrToInt = new HashMap<>(); + Map headerMapIntToStr = new HashMap<>(); + + for (int i = 0; i < expectedHeaders.length; i++) { + headerMapStrToInt.put(expectedHeaders[i], i); + headerMapIntToStr.put(i, expectedHeaders[i]); + } + + for (int i = 0; i < actualHeaders.length; i++) { + String expectedColHeader = headerMapIntToStr.get(i); + String actualColHeader = actualHeaders[i]; + + int newIndex = i; + + if (expectedColHeader == null || !expectedColHeader.equals(actualColHeader)) { + if (!headerMapStrToInt.containsKey(actualColHeader)) { + continue; + } + newIndex = headerMapStrToInt.get(actualColHeader); + } + + headerIndexLookup[i] = newIndex; + } + + return headerIndexLookup; + } +} diff --git a/src/test/java/gov/hhs/aspr/ms/util/readers/AT_TextTableReader.java b/src/test/java/gov/hhs/aspr/ms/util/readers/AT_TextTableReader.java new file mode 100644 index 0000000..5bbece4 --- /dev/null +++ b/src/test/java/gov/hhs/aspr/ms/util/readers/AT_TextTableReader.java @@ -0,0 +1,26 @@ +package gov.hhs.aspr.ms.util.readers; + +import java.nio.file.Path; +import java.util.function.Consumer; + +import org.junit.jupiter.api.Test; + +import gov.hhs.aspr.ms.util.annotations.UnitTag; +import gov.hhs.aspr.ms.util.annotations.UnitTestMethod; + +public class AT_TextTableReader { + + @Test + @UnitTestMethod(target = TextTableReader.class, name = "readToMap", args = { String.class, String.class, Path.class, + Consumer.class }, tags = {UnitTag.INCOMPLETE}) + public void testRead_Map() { + + } + + @Test + @UnitTestMethod(target = TextTableReader.class, name = "read", args = { String.class, String.class, Path.class, + Consumer.class }, tags = {UnitTag.INCOMPLETE}) + public void testRead() { + + } +} From 8d057ca916abc998d7e9114c23bf86b0f9c8a204 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 01:28:41 -0500 Subject: [PATCH 20/30] Bump the test-dependencies group with 2 updates (#16) Bumps the test-dependencies group with 2 updates: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5). Updates `org.junit.jupiter:junit-jupiter-engine` from 5.10.1 to 5.10.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.1...r5.10.2) Updates `org.junit.jupiter:junit-jupiter-api` from 5.10.1 to 5.10.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.1...r5.10.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test-dependencies - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2f8de07..3e6c63c 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ 3.6.1 1.0 - 5.10.1 + 5.10.2 0.8.11 From a5a2859b964077b9a961bd2aea054dfe6159c218 Mon Sep 17 00:00:00 2001 From: Zachary Bischoff <116595361+bischoffz@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:13:15 -0500 Subject: [PATCH 21/30] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3e6c63c..6d9645c 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ gov.hhs.aspr.ms util - 4.1.0-SNAPSHOT + 4.1.0 jar Modeling Utils From 69138b9c4e2b6aba15e391ccd4118b4bb9d40796 Mon Sep 17 00:00:00 2001 From: bischoffz Date: Sun, 31 Mar 2024 22:49:19 -0400 Subject: [PATCH 22/30] update pom --- pom.xml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 5268f49..24bb416 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ gov.hhs.aspr.ms util - 4.1.1 + 4.1.2-SNAPSHOT jar Modeling Utils @@ -55,14 +55,13 @@ UTF-8 17 17 - - false 3.2.5 3.3.0 3.6.3 3.2.2 + 0.4.0 3.6.1 @@ -137,11 +136,12 @@ org.sonatype.central central-publishing-maven-plugin - 0.4.0 + ${central-publishing-maven-plugin.version} true central true + ASPR MS Util @@ -197,9 +197,6 @@ - - false - From b8e889c90ec34f997639340a47c76996080209bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 00:11:57 -0400 Subject: [PATCH 23/30] Bump org.apache.maven.plugins:maven-source-plugin (#19) Bumps the standard-plugins group with 1 update: [org.apache.maven.plugins:maven-source-plugin](https://github.com/apache/maven-source-plugin). Updates `org.apache.maven.plugins:maven-source-plugin` from 3.3.0 to 3.3.1 - [Commits](https://github.com/apache/maven-source-plugin/compare/maven-source-plugin-3.3.0...maven-source-plugin-3.3.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-source-plugin dependency-type: direct:production update-type: version-update:semver-patch dependency-group: standard-plugins ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 24bb416..7b404ad 100644 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,7 @@ 3.2.5 - 3.3.0 + 3.3.1 3.6.3 3.2.2 0.4.0 From 1dfcf99bab771504bab319cda723900b1fa36773 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 00:12:07 -0400 Subject: [PATCH 24/30] Bump org.jacoco:jacoco-maven-plugin in the test-dependencies group (#20) Bumps the test-dependencies group with 1 update: [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco). Updates `org.jacoco:jacoco-maven-plugin` from 0.8.11 to 0.8.12 - [Release notes](https://github.com/jacoco/jacoco/releases) - [Commits](https://github.com/jacoco/jacoco/compare/v0.8.11...v0.8.12) --- updated-dependencies: - dependency-name: org.jacoco:jacoco-maven-plugin dependency-type: direct:development update-type: version-update:semver-patch dependency-group: test-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7b404ad..08a05f6 100644 --- a/pom.xml +++ b/pom.xml @@ -67,7 +67,7 @@ 3.6.1 1.0 5.10.2 - 0.8.11 + 0.8.12 From dc89eea63eca560a0cd3f7945b652e1dfc215aa0 Mon Sep 17 00:00:00 2001 From: bischoffz Date: Fri, 12 Apr 2024 00:36:51 -0400 Subject: [PATCH 25/30] add flatten maven pom --- pom.xml | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 08a05f6..2254ea6 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ https://www.gnu.org/licenses/gpl-3.0.en.html - Vulnerability Disclosure Policy + HHS Vulnerability Disclosure Policy https://www.hhs.gov/vulnerability-disclosure-policy/index.html @@ -57,6 +57,7 @@ 17 + 1.6.0 3.2.5 3.3.1 3.6.3 @@ -105,6 +106,36 @@ + + + org.codehaus.mojo + flatten-maven-plugin + ${flatten-maven-plugin.version} + + + + flatten + process-resources + + flatten + + + true + ossrh + all + + + + + flatten.clean + clean + + clean + + + + + org.apache.maven.plugins From 2f5f4f96f0720a694ad32ddb686b591be7e746b0 Mon Sep 17 00:00:00 2001 From: bischoffz Date: Fri, 12 Apr 2024 00:37:20 -0400 Subject: [PATCH 26/30] add sontatype plugin to dependabot --- .github/dependabot.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8cfc936..669cb66 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,7 +8,7 @@ updates: - package-ecosystem: "maven" # See documentation for possible values directory: "/" # Location of package manifests schedule: - interval: "weekly" + interval: "daily" target-branch: "dev" open-pull-requests-limit: 10 groups: @@ -16,6 +16,9 @@ updates: patterns: - "org.codehaus.mojo:flatten-maven-plugin" - "org.apache.maven.plugins*" + deploy-plugins: + patterns: + - "org.sonatype.central" dependencies: patterns: - "org.apache.commons:commons-math3" From e9fdf58890a92e920f13db7396c81ba3a616e3af Mon Sep 17 00:00:00 2001 From: bischoffz Date: Mon, 15 Apr 2024 00:03:27 -0400 Subject: [PATCH 27/30] update workflows --- .github/workflows/dev_build.yml | 2 +- .github/workflows/release_build.yml | 2 +- .github/workflows/release_pr_build.yml | 11 ++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev_build.yml b/.github/workflows/dev_build.yml index dc82252..dfc187c 100644 --- a/.github/workflows/dev_build.yml +++ b/.github/workflows/dev_build.yml @@ -15,7 +15,7 @@ on: branches-ignore: ["main"] jobs: - build: + dev-build: runs-on: ubuntu-latest steps: - name: Checkout Util diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index f6fe721..9339be5 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -16,7 +16,7 @@ on: branches: ["main"] jobs: - build-deploy: + release: runs-on: ubuntu-latest permissions: contents: write diff --git a/.github/workflows/release_pr_build.yml b/.github/workflows/release_pr_build.yml index 07b3f9f..1cfd154 100644 --- a/.github/workflows/release_pr_build.yml +++ b/.github/workflows/release_pr_build.yml @@ -13,7 +13,7 @@ on: branches: ["main"] jobs: - build: + release-pr-build: runs-on: ubuntu-latest steps: - name: Checkout Util @@ -24,7 +24,16 @@ jobs: with: java-version: '17' distribution: 'temurin' + - name: Get Version + run: | + echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV" + - name: Version Is Snapshot + if: ${{ endsWith(env.version, 'SNAPSHOT') }} + run: | + echo "Version is a SNAPSHOT version. Update version to proper version." + exit 1 + - name: Build Util run: mvn clean install -Pjavadoc,jacoco --file pom.xml From e74fe4f7c496385cac622e28432a2b152aa75dba Mon Sep 17 00:00:00 2001 From: bischoffz Date: Mon, 15 Apr 2024 00:06:46 -0400 Subject: [PATCH 28/30] update dependabot --- .github/dependabot.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 669cb66..784cc02 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -16,6 +16,7 @@ updates: patterns: - "org.codehaus.mojo:flatten-maven-plugin" - "org.apache.maven.plugins*" + - "org.sonatype.central" deploy-plugins: patterns: - "org.sonatype.central" From 3a962221e6d8541166e84b3deba7f813c203fa6b Mon Sep 17 00:00:00 2001 From: bischoffz Date: Mon, 15 Apr 2024 00:08:43 -0400 Subject: [PATCH 29/30] update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3fe827e..d5ccae6 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ To use this project in your project, simply add the following dependency to your gov.hhs.aspr.ms util - 4.1.1 + 4.1.2 ``` ## Building from Source From afc440c1955f4cf827bd55052c7d61d58efb9268 Mon Sep 17 00:00:00 2001 From: bischoffz Date: Mon, 15 Apr 2024 01:22:38 -0400 Subject: [PATCH 30/30] update to 4.1.2 proper --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2254ea6..dafc5ea 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ gov.hhs.aspr.ms util - 4.1.2-SNAPSHOT + 4.1.2 jar Modeling Utils