summaryrefslogtreecommitdiff
path: root/base/src/main/java/bjc/utils/esodata/Directory.java
diff options
context:
space:
mode:
authorBenjamin J. Culkin <bjculkin@mix.wvu.edu>2017-10-11 13:41:07 -0300
committerBenjamin J. Culkin <bjculkin@mix.wvu.edu>2017-10-11 13:41:07 -0300
commit946cab444bc301d8a7c756a1bab039558288de89 (patch)
tree419f27c39a509bcd83cae0e6630be8eb7ff95a30 /base/src/main/java/bjc/utils/esodata/Directory.java
parentc82e3b3b2de0633317ec8fc85925e91422820597 (diff)
Cleanup work
Diffstat (limited to 'base/src/main/java/bjc/utils/esodata/Directory.java')
-rw-r--r--base/src/main/java/bjc/utils/esodata/Directory.java54
1 files changed, 31 insertions, 23 deletions
diff --git a/base/src/main/java/bjc/utils/esodata/Directory.java b/base/src/main/java/bjc/utils/esodata/Directory.java
index 17b70f5..4b25cda 100644
--- a/base/src/main/java/bjc/utils/esodata/Directory.java
+++ b/base/src/main/java/bjc/utils/esodata/Directory.java
@@ -7,21 +7,22 @@ package bjc.utils.esodata;
* be able to ensure that they can't write outside of it.
*
* @param <K>
- * The key type of the map.
+ * The key type of the map.
* @param <V>
- * The value type of the map.
+ * The value type of the map.
*/
public interface Directory<K, V> {
/**
* Retrieves a given sub-directory.
*
* @param key
- * The key to retrieve the sub-directory for.
+ * The key to retrieve the sub-directory for.
*
- * @return The sub-directory under that name.
+ * @return
+ * The sub-directory under that name.
*
* @throws IllegalArgumentException
- * If the given sub-directory doesn't exist.
+ * If the given sub-directory doesn't exist.
*/
Directory<K, V> getSubdirectory(K key);
@@ -29,9 +30,10 @@ public interface Directory<K, V> {
* Check if a given sub-directory exists.
*
* @param key
- * The key to look for the sub-directory under.
+ * The key to look for the sub-directory under.
*
- * @return Whether or not a sub-directory of that name exists.
+ * @return
+ * Whether or not a sub-directory of that name exists.
*/
boolean hasSubdirectory(K key);
@@ -39,12 +41,13 @@ public interface Directory<K, V> {
* Insert a sub-directory into the dictionary.
*
* @param key
- * The name of the new sub-directory
+ * The name of the new sub-directory
* @param value
- * The sub-directory to insert
+ * The sub-directory to insert
*
- * @return The old sub-directory attached to this key, or null if such a
- * sub-directory didn't exist
+ * @return
+ * The old sub-directory attached to this key, or null if such a
+ * sub-directory didn't exist
*/
Directory<K, V> putSubdirectory(K key, Directory<K, V> value);
@@ -54,10 +57,11 @@ public interface Directory<K, V> {
* Will fail if a sub-directory of that name already exists.
*
* @param key
- * The name of the new sub-directory.
+ * The name of the new sub-directory.
*
- * @return The new sub-directory, or null if one by that name already
- * exists.
+ * @return
+ * The new sub-directory, or null if one by that name already
+ * exists.
*/
default Directory<K, V> newSubdirectory(final K key) {
if (hasSubdirectory(key)) return null;
@@ -73,9 +77,10 @@ public interface Directory<K, V> {
* Check if the directory contains a data-item under the given key.
*
* @param key
- * The key to check for.
+ * The key to check for.
*
- * @return Whether or not there is a data item for the given key.
+ * @return
+ * Whether or not there is a data item for the given key.
*/
boolean containsKey(K key);
@@ -83,12 +88,13 @@ public interface Directory<K, V> {
* Retrieve a given data-item from the directory.
*
* @param key
- * The key to retrieve data for.
+ * The key to retrieve data for.
*
- * @return The value for the given key.
+ * @return
+ * The value for the given key.
*
* @throws IllegalArgumentException
- * If no value exists for the given key.
+ * If no value exists for the given key.
*/
V getKey(K key);
@@ -96,11 +102,13 @@ public interface Directory<K, V> {
* Insert a data-item into the directory.
*
* @param key
- * The key to insert into.
+ * The key to insert into.
+ *
* @param val
- * The value to insert.
+ * The value to insert.
*
- * @return The old value of key, or null if such a value didn't exist.
+ * @return
+ * The old value of key, or null if such a value didn't exist.
*/
V putKey(K key, V val);
-} \ No newline at end of file
+}