From a2c7425458f645802a352abc4783e0afc73dba13 Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Thu, 3 Dec 2020 19:22:35 -0500 Subject: Adapt to esodata changes --- .../java/bjc/utils/components/FileComponentRepository.java | 14 +++++++------- .../java/bjc/utils/components/IComponentRepository.java | 8 ++++---- .../bjc/utils/components/MemoryComponentRepository.java | 10 +++++----- 3 files changed, 16 insertions(+), 16 deletions(-) (limited to 'base/src/main/java/bjc/utils/components') 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 = Logger.getLogger("FileComponentRepository"); /* The internal storage of components. */ - private IMap components; + private MapEx components; /* The path that all the components came from. */ private Path sourceDirectory; @@ -69,7 +69,7 @@ public class FileComponentRepository sourceDirectory = directory.toPath().toAbsolutePath(); /* Marker for making sure we don't skip the parent. */ - final IHolder isFirstDir = new Identity<>(true); + final Holder 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 } @Override - public IMap getAll() { + public MapEx getAll() { return components; } @@ -120,7 +120,7 @@ public class FileComponentRepository } @Override - public IList getList() { + public ListEx 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 * @return A map from component name to component, containing all of the * components in the repositories. */ - public IMap getAll(); + public MapEx getAll(); /** * Get a component with a specific name. @@ -36,7 +36,7 @@ public interface IComponentRepository * * @return A list of all the registered components. */ - public default IList getList() { + public default ListEx 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 implements IComponentRepository { - private final IMap repo; + private final MapEx repo; private final String source; @@ -22,7 +22,7 @@ public class MemoryComponentRepository repo) { + public MemoryComponentRepository(MapEx repo) { this(repo, "memory"); } @@ -34,14 +34,14 @@ public class MemoryComponentRepository repo, String source) { + public MemoryComponentRepository(MapEx repo, String source) { this.repo = repo; this.source = source; } @Override - public IMap getAll() { + public MapEx getAll() { return repo; } -- cgit v1.2.3