summaryrefslogtreecommitdiff
path: root/src/main/java/bjc/esodata
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/bjc/esodata')
-rw-r--r--src/main/java/bjc/esodata/AbbrevMap2.java2
-rw-r--r--src/main/java/bjc/esodata/AbbrevTree.java~75
-rw-r--r--src/main/java/bjc/esodata/NestList.java3
-rw-r--r--src/main/java/bjc/esodata/spool/Spool.java5
-rw-r--r--src/main/java/bjc/esodata/spool/Spooler.java5
5 files changed, 12 insertions, 78 deletions
diff --git a/src/main/java/bjc/esodata/AbbrevMap2.java b/src/main/java/bjc/esodata/AbbrevMap2.java
index 259c963..341a28d 100644
--- a/src/main/java/bjc/esodata/AbbrevMap2.java
+++ b/src/main/java/bjc/esodata/AbbrevMap2.java
@@ -41,7 +41,7 @@ public class AbbrevMap2 {
}
// Generate all of the strings a given word could be abbreviated as
- private List<String> genAbbrevs(String word) {
+ private static List<String> genAbbrevs(String word) {
List<String> retList = new ArrayList<>();
int len = word.length();
diff --git a/src/main/java/bjc/esodata/AbbrevTree.java~ b/src/main/java/bjc/esodata/AbbrevTree.java~
deleted file mode 100644
index a391028..0000000
--- a/src/main/java/bjc/esodata/AbbrevTree.java~
+++ /dev/null
@@ -1,75 +0,0 @@
-package bjc.esodata;
-
-import java.util.*;
-
-/**
- * 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.
- *
- * @param <Contained> The type of data contained in the nodes.
- */
-public class AbbrevTree<Contained> {
- /** Represents a single node in an AbbrevTree */
- public interface AbbrevNode<Contained> {
- /** The label for the node. */
- public String getLabel();
- /** The data for the node. */
- public Contained getData();
- /**
- * Add a child to this node.
- *
- * If a node already exists with the given label, it will be replaced.
- *
- * @param label The label for the child.
- * @param contained The data contained in the child.
- */
- public void addChild(String label, String contained);
- /**
- * Get a child, starting the search from this node.
- * @param labels The label(s) to search for. If the label is ambiguous, provide additional ones to make it unambiguous.
- */
- public AbbrevNode<Contained> getNode(String... labels);
- }
-
- public Contained get(String... labels) {
- return null;
- }
-}
-
-class AbbrevNode<Contained> {
- private String label;
- private Contained data;
-
- private List<AbbrevNode<Contained>> children;
- private AbbrevTree<Contained> container;
-
- /**
- * Create a new AbbrevNode with a label and contents.
- * @param label The label for this node.
- * @param data The data contained in the node.
- * @param container The tree that contains the node.
- */
- public AbbrevNode(String label, Contained data, AbbrevTree<Contained> container) {
- this(container);
-
- this.label = label;
- this.data = data;
- }
-
- /**
- * Get the label for this node.
- * @return The label for this node.
- */
- public String getLabel() {
- return label;
- }
-
- /**
- * Get the data for this node.
- * @return The data for this node.
- */
- public Contained getData() {
- return data;
- }
-}
diff --git a/src/main/java/bjc/esodata/NestList.java b/src/main/java/bjc/esodata/NestList.java
index eccaf9d..9d9149c 100644
--- a/src/main/java/bjc/esodata/NestList.java
+++ b/src/main/java/bjc/esodata/NestList.java
@@ -351,8 +351,7 @@ public class NestList<Element> extends AbstractList<Either<Element, NestList<Ele
return backing.get(index);
}
- @SuppressWarnings("unlikely-arg-type")
- @Override
+ @Override
public boolean remove(Object o) {
return backing.remove(o);
}
diff --git a/src/main/java/bjc/esodata/spool/Spool.java b/src/main/java/bjc/esodata/spool/Spool.java
new file mode 100644
index 0000000..dbd2ce8
--- /dev/null
+++ b/src/main/java/bjc/esodata/spool/Spool.java
@@ -0,0 +1,5 @@
+package bjc.esodata.spool;
+
+public interface Spool<Contained> {
+
+}
diff --git a/src/main/java/bjc/esodata/spool/Spooler.java b/src/main/java/bjc/esodata/spool/Spooler.java
new file mode 100644
index 0000000..a222a25
--- /dev/null
+++ b/src/main/java/bjc/esodata/spool/Spooler.java
@@ -0,0 +1,5 @@
+package bjc.esodata.spool;
+
+public interface Spooler {
+ public <E> Spool<E> getSpool();
+}