From 629b6bc7444005915983ae8d86c89c4ae215729e Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Tue, 26 Jul 2022 20:35:01 -0400 Subject: Restructure a bit --- .classpath | 16 +- .settings/org.eclipse.jdt.core.prefs | 6 +- pom.xml | 578 ++++---- src/main/java/bjc/data/Multimap.java | 16 - src/main/java/bjc/esodata/.AbbrevTree.java.un~ | Bin 0 -> 33807 bytes src/main/java/bjc/esodata/AbbrevTree.java | 276 ++++ src/main/java/bjc/esodata/AbbrevTree.java~ | 75 ++ src/main/java/bjc/esodata/Multimap.java | 44 +- src/main/java/bjc/esodata/ThresholdSet.java | 74 +- src/main/java/module-info.java | 8 + src/test/java/bjc/TestUtils.java | 141 -- src/test/java/bjc/data/ArrayIteratorTest.java | 33 - src/test/java/bjc/data/BooleanToggleTest.java | 52 - src/test/java/bjc/data/CircularIteratorTest.java | 57 - src/test/java/bjc/data/EitherTest.java | 35 - src/test/java/bjc/data/QueuedIteratorTest.java | 73 -- src/test/java/bjc/esodata/MinMaxListTest.java | 52 - src/test/java/bjc/esodata/NestListTest.java | 119 -- src/test/java/bjc/esodata/StackTest.java | 235 ---- src/test/java/bjc/esodata/ThresholdSetTest.java | 79 -- src/test/java/bjc/funcdata/TestMapCreation.java | 38 - src/test/java/bjc/funcdata/TestMapOperations.java | 153 --- src/test/java/bjc/functypes/IDTest.java | 21 - src/test/java/bjc/test/TestUtils.java | 141 ++ src/test/java/bjc/test/data/ArrayIteratorTest.java | 35 + src/test/java/bjc/test/data/BooleanToggleTest.java | 54 + .../java/bjc/test/data/CircularIteratorTest.java | 59 + src/test/java/bjc/test/data/EitherTest.java | 36 + .../java/bjc/test/data/QueuedIteratorTest.java | 75 ++ src/test/java/bjc/test/esodata/AbbrevTreeTest.java | 46 + src/test/java/bjc/test/esodata/MinMaxListTest.java | 54 + src/test/java/bjc/test/esodata/NestListTest.java | 120 ++ src/test/java/bjc/test/esodata/StackTest.java | 238 ++++ .../java/bjc/test/esodata/ThresholdSetTest.java | 81 ++ .../java/bjc/test/funcdata/TestMapCreation.java | 40 + .../java/bjc/test/funcdata/TestMapOperations.java | 155 +++ src/test/java/bjc/test/functypes/IDTest.java | 23 + tags | 1375 ++++++++++++++++++++ 38 files changed, 3277 insertions(+), 1436 deletions(-) delete mode 100644 src/main/java/bjc/data/Multimap.java create mode 100644 src/main/java/bjc/esodata/.AbbrevTree.java.un~ create mode 100644 src/main/java/bjc/esodata/AbbrevTree.java create mode 100644 src/main/java/bjc/esodata/AbbrevTree.java~ create mode 100644 src/main/java/module-info.java delete mode 100644 src/test/java/bjc/TestUtils.java delete mode 100644 src/test/java/bjc/data/ArrayIteratorTest.java delete mode 100644 src/test/java/bjc/data/BooleanToggleTest.java delete mode 100644 src/test/java/bjc/data/CircularIteratorTest.java delete mode 100644 src/test/java/bjc/data/EitherTest.java delete mode 100644 src/test/java/bjc/data/QueuedIteratorTest.java delete mode 100644 src/test/java/bjc/esodata/MinMaxListTest.java delete mode 100644 src/test/java/bjc/esodata/NestListTest.java delete mode 100644 src/test/java/bjc/esodata/StackTest.java delete mode 100644 src/test/java/bjc/esodata/ThresholdSetTest.java delete mode 100644 src/test/java/bjc/funcdata/TestMapCreation.java delete mode 100644 src/test/java/bjc/funcdata/TestMapOperations.java delete mode 100644 src/test/java/bjc/functypes/IDTest.java create mode 100644 src/test/java/bjc/test/TestUtils.java create mode 100644 src/test/java/bjc/test/data/ArrayIteratorTest.java create mode 100644 src/test/java/bjc/test/data/BooleanToggleTest.java create mode 100644 src/test/java/bjc/test/data/CircularIteratorTest.java create mode 100644 src/test/java/bjc/test/data/EitherTest.java create mode 100644 src/test/java/bjc/test/data/QueuedIteratorTest.java create mode 100644 src/test/java/bjc/test/esodata/AbbrevTreeTest.java create mode 100644 src/test/java/bjc/test/esodata/MinMaxListTest.java create mode 100644 src/test/java/bjc/test/esodata/NestListTest.java create mode 100644 src/test/java/bjc/test/esodata/StackTest.java create mode 100644 src/test/java/bjc/test/esodata/ThresholdSetTest.java create mode 100644 src/test/java/bjc/test/funcdata/TestMapCreation.java create mode 100644 src/test/java/bjc/test/funcdata/TestMapOperations.java create mode 100644 src/test/java/bjc/test/functypes/IDTest.java create mode 100644 tags diff --git a/.classpath b/.classpath index 9fdcfec..595e52c 100644 --- a/.classpath +++ b/.classpath @@ -1,27 +1,27 @@ - + + - - + - - - - + + - + + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 7ad3ace..aeacc3c 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,7 +1,7 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.source=17 diff --git a/pom.xml b/pom.xml index e3882db..c846404 100644 --- a/pom.xml +++ b/pom.xml @@ -1,292 +1,292 @@ - 4.0.0 - io.github.bculkin2442 - esodata - 1.0-SNAPSHOT - jar - esodata - Esoteric or uncommon data structures - http://www.github.com/bculkin2442/esodata - - - Ben Culkin - bjculkin@mix.wvu.edu - https://github.com/bculkin2442 - - - - scm:git:git://github.com/bculkin2442/esodata.git - scm:git:ssh://github.com:bculkin2442/esodata.git - http://www.github.com/bculkin2442/esodata/tree/master - - - UTF-8 - 1.8 - 1.8 - - github - - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - junit - junit - 4.13.1 - test - - - - - - maven-clean-plugin - 3.1.0 - - - maven-resources-plugin - 3.0.2 - - - maven-compiler-plugin - 3.8.0 - - - maven-surefire-plugin - 2.22.1 - - - ${surefireArgLine} - - - - maven-jar-plugin - 3.0.2 - - - maven-install-plugin - 2.5.2 - - - maven-deploy-plugin - 2.8.2 - - - maven-site-plugin - 3.7.1 - - - maven-project-info-reports-plugin - 3.0.0 - - - org.apache.maven.plugins - maven-release-plugin - 2.5.3 - - true - false - release - deploy - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 - true - - ossrh - https://oss.sonatype.org/ - true - - - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - - - Site Copy - post-site - - exec - - - rsync - - -av - --delete - target/site/ - docs/ - - - - - - - org.jacoco - jacoco-maven-plugin - 0.8.2 - - - - pre-unit-test - - prepare-agent - - - - ${project.build.directory}/coverage-reports/jacoco-ut.exec - - surefireArgLine - - - - - post-unit-test - test - - report - - - - ${project.build.directory}/coverage-reports/jacoco-ut.exec - - ${project.reporting.outputDirectory}/jacoco-ut - - - - - - - - data/ - - **/*.txt - - - - - - - release - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9.1 - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 - true - - ossrh - https://oss.sonatype.org/ - true - - - - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.0 - - - - maven-surefire-plugin - 2.22.1 - - - maven-changes-plugin - 2.12.1 - - - maven-changelog-plugin - 2.3 - - - - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - + 4.0.0 + io.github.bculkin2442 + esodata + 2.0-SNAPSHOT + jar + esodata + Esoteric or uncommon data structures + http://www.github.com/bculkin2442/esodata + + + Ben Culkin + bjculkin@mix.wvu.edu + https://github.com/bculkin2442 + + + + scm:git:git://github.com/bculkin2442/esodata.git + scm:git:ssh://github.com:bculkin2442/esodata.git + http://www.github.com/bculkin2442/esodata/tree/master + + + UTF-8 + 17 + 17 + + github + + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + junit + junit + 4.13.1 + test + + + + + + maven-clean-plugin + 3.1.0 + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.2 + + + ${surefireArgLine} + + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + org.apache.maven.plugins + maven-release-plugin + 2.5.3 + + true + false + release + deploy + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ossrh + https://oss.sonatype.org/ + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.6.0 + + + + + Site Copy + post-site + + exec + + + rsync + + -av + --delete + target/site/ + docs/ + + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.2 + + + + pre-unit-test + + prepare-agent + + + + ${project.build.directory}/coverage-reports/jacoco-ut.exec + + surefireArgLine + + + + + post-unit-test + test + + report + + + + ${project.build.directory}/coverage-reports/jacoco-ut.exec + + ${project.reporting.outputDirectory}/jacoco-ut + + + + + + + + data/ + + **/*.txt + + + + + + + release + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ossrh + https://oss.sonatype.org/ + true + + + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.0 + + + + maven-surefire-plugin + 2.22.1 + + + maven-changes-plugin + 2.12.1 + + + maven-changelog-plugin + 2.3 + + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + diff --git a/src/main/java/bjc/data/Multimap.java b/src/main/java/bjc/data/Multimap.java deleted file mode 100644 index 0e858b7..0000000 --- a/src/main/java/bjc/data/Multimap.java +++ /dev/null @@ -1,16 +0,0 @@ -package bjc.data; - -/** - * A map with support for multiple values per key. - * - * @param - * The type of the keys for the map. - * @param - * The type of the values for the map. - * - * @author Ben Culkin - */ -public class Multimap { - // TODO either implement this, or find if there is an implementation I've - // written elsewhere -} diff --git a/src/main/java/bjc/esodata/.AbbrevTree.java.un~ b/src/main/java/bjc/esodata/.AbbrevTree.java.un~ new file mode 100644 index 0000000..7c8a369 Binary files /dev/null and b/src/main/java/bjc/esodata/.AbbrevTree.java.un~ differ diff --git a/src/main/java/bjc/esodata/AbbrevTree.java b/src/main/java/bjc/esodata/AbbrevTree.java new file mode 100644 index 0000000..35c44f0 --- /dev/null +++ b/src/main/java/bjc/esodata/AbbrevTree.java @@ -0,0 +1,276 @@ +package bjc.esodata; + +import java.util.*; + +import bjc.data.Pair; +import bjc.data.TransformIterator; +import bjc.funcdata.FunctionalList; +import bjc.funcdata.ListEx; + +/** + * A labeled tree, where you can reference sub-nodes by their label as long as + * the reference is unambiguous. + * + * Inspired by the way that you can reference COBOL members by their name, as + * long as it is unambiguous. If it is ambiguous, you can instead use parent + * nodes to disambiguate. + * + * Additional note: The base iterator will give you all of the child nodes, but + * in no defined order. + * + * @param