summaryrefslogtreecommitdiff
path: root/base/src/main/java/bjc/utils/components
diff options
context:
space:
mode:
authorBen Culkin <scorpress@gmail.com>2020-12-03 19:22:35 -0500
committerBen Culkin <scorpress@gmail.com>2020-12-03 19:22:35 -0500
commita2c7425458f645802a352abc4783e0afc73dba13 (patch)
tree92fe887eb09674ddc61c251626989c06aff88a22 /base/src/main/java/bjc/utils/components
parentbcda03dd2ba95a93a93df7f139b3607491750b74 (diff)
Adapt to esodata changes
Diffstat (limited to 'base/src/main/java/bjc/utils/components')
-rw-r--r--base/src/main/java/bjc/utils/components/FileComponentRepository.java14
-rw-r--r--base/src/main/java/bjc/utils/components/IComponentRepository.java8
-rw-r--r--base/src/main/java/bjc/utils/components/MemoryComponentRepository.java10
3 files changed, 16 insertions, 16 deletions
diff --git a/base/src/main/java/bjc/utils/components/FileComponentRepository.java b/base/src/main/java/bjc/utils/components/FileComponentRepository.java
index 6e6e604..fa98d03 100644
--- a/base/src/main/java/bjc/utils/components/FileComponentRepository.java
+++ b/base/src/main/java/bjc/utils/components/FileComponentRepository.java
@@ -9,11 +9,11 @@ import java.util.function.Function;
import java.util.logging.Level;
import java.util.logging.Logger;
-import bjc.data.IHolder;
+import bjc.data.Holder;
import bjc.data.Identity;
import bjc.funcdata.FunctionalMap;
-import bjc.funcdata.IList;
-import bjc.funcdata.IMap;
+import bjc.funcdata.ListEx;
+import bjc.funcdata.MapEx;
import bjc.utils.funcutils.FileUtils;
/**
@@ -31,7 +31,7 @@ public class FileComponentRepository<ComponentType extends IDescribedComponent>
= Logger.getLogger("FileComponentRepository");
/* The internal storage of components. */
- private IMap<String, ComponentType> components;
+ private MapEx<String, ComponentType> components;
/* The path that all the components came from. */
private Path sourceDirectory;
@@ -69,7 +69,7 @@ public class FileComponentRepository<ComponentType extends IDescribedComponent>
sourceDirectory = directory.toPath().toAbsolutePath();
/* Marker for making sure we don't skip the parent. */
- final IHolder<Boolean> isFirstDir = new Identity<>(true);
+ final Holder<Boolean> isFirstDir = new Identity<>(true);
/*
* Predicate to use to traverse all the files in a directory, but not recurse
@@ -110,7 +110,7 @@ public class FileComponentRepository<ComponentType extends IDescribedComponent>
}
@Override
- public IMap<String, ComponentType> getAll() {
+ public MapEx<String, ComponentType> getAll() {
return components;
}
@@ -120,7 +120,7 @@ public class FileComponentRepository<ComponentType extends IDescribedComponent>
}
@Override
- public IList<ComponentType> getList() {
+ public ListEx<ComponentType> getList() {
return components.valueList();
}
diff --git a/base/src/main/java/bjc/utils/components/IComponentRepository.java b/base/src/main/java/bjc/utils/components/IComponentRepository.java
index 5ebb1de..7a40541 100644
--- a/base/src/main/java/bjc/utils/components/IComponentRepository.java
+++ b/base/src/main/java/bjc/utils/components/IComponentRepository.java
@@ -1,7 +1,7 @@
package bjc.utils.components;
-import bjc.funcdata.IList;
-import bjc.funcdata.IMap;
+import bjc.funcdata.ListEx;
+import bjc.funcdata.MapEx;
/**
* A collection of implementations of a particular type of
@@ -19,7 +19,7 @@ public interface IComponentRepository<ComponentType extends IDescribedComponent>
* @return A map from component name to component, containing all of the
* components in the repositories.
*/
- public IMap<String, ComponentType> getAll();
+ public MapEx<String, ComponentType> getAll();
/**
* Get a component with a specific name.
@@ -36,7 +36,7 @@ public interface IComponentRepository<ComponentType extends IDescribedComponent>
*
* @return A list of all the registered components.
*/
- public default IList<ComponentType> getList() {
+ public default ListEx<ComponentType> getList() {
return getAll().valueList();
}
diff --git a/base/src/main/java/bjc/utils/components/MemoryComponentRepository.java b/base/src/main/java/bjc/utils/components/MemoryComponentRepository.java
index bba0867..2e11616 100644
--- a/base/src/main/java/bjc/utils/components/MemoryComponentRepository.java
+++ b/base/src/main/java/bjc/utils/components/MemoryComponentRepository.java
@@ -1,6 +1,6 @@
package bjc.utils.components;
-import bjc.funcdata.IMap;
+import bjc.funcdata.MapEx;
/**
* A repository of components stored in memory.
@@ -12,7 +12,7 @@ import bjc.funcdata.IMap;
*/
public class MemoryComponentRepository<ComponentType extends IDescribedComponent>
implements IComponentRepository<ComponentType> {
- private final IMap<String, ComponentType> repo;
+ private final MapEx<String, ComponentType> repo;
private final String source;
@@ -22,7 +22,7 @@ public class MemoryComponentRepository<ComponentType extends IDescribedComponent
* @param repo
* The set of components to use.
*/
- public MemoryComponentRepository(IMap<String, ComponentType> repo) {
+ public MemoryComponentRepository(MapEx<String, ComponentType> repo) {
this(repo, "memory");
}
@@ -34,14 +34,14 @@ public class MemoryComponentRepository<ComponentType extends IDescribedComponent
* @param source
* Where the components came from.
*/
- public MemoryComponentRepository(IMap<String, ComponentType> repo, String source) {
+ public MemoryComponentRepository(MapEx<String, ComponentType> repo, String source) {
this.repo = repo;
this.source = source;
}
@Override
- public IMap<String, ComponentType> getAll() {
+ public MapEx<String, ComponentType> getAll() {
return repo;
}