diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2018-10-13 15:51:53 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2018-10-13 15:51:53 -0400 |
| commit | 327c2a35bde7a13d77f343464e41e19e4a214790 (patch) | |
| tree | 8ae7a2698eed1e281c20b9333b79b2eaf6607a92 /base/src/main/java/bjc/utils/components/MemoryComponentRepository.java | |
| parent | bf9737ae3c61c638dca3a40ca847e784ddd750f3 (diff) | |
General cleanup and documentation.
Cleanup files, and add missing comments in places.
Diffstat (limited to 'base/src/main/java/bjc/utils/components/MemoryComponentRepository.java')
| -rw-r--r-- | base/src/main/java/bjc/utils/components/MemoryComponentRepository.java | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/base/src/main/java/bjc/utils/components/MemoryComponentRepository.java b/base/src/main/java/bjc/utils/components/MemoryComponentRepository.java index 658aaa1..a4b8dda 100644 --- a/base/src/main/java/bjc/utils/components/MemoryComponentRepository.java +++ b/base/src/main/java/bjc/utils/components/MemoryComponentRepository.java @@ -2,21 +2,44 @@ package bjc.utils.components; import bjc.utils.funcdata.IMap; -public class MemoryComponentRepository<ComponentType extends IDescribedComponent> implements IComponentRepository<ComponentType> { +/** + * A repository of components stored in memory. + * + * @author bjculkin + * + * @param <ComponentType> + */ +public class MemoryComponentRepository<ComponentType extends IDescribedComponent> + implements IComponentRepository<ComponentType> { private final IMap<String, ComponentType> repo; private final String source; + /** + * Create a new memory component repository. + * + * @param repo + * The set of components to use. + */ public MemoryComponentRepository(IMap<String, ComponentType> repo) { this(repo, "memory"); } + /** + * Create a new memory component repository. + * + * @param repo + * The set of components to use. + * @param source + * Where the components came from. + */ public MemoryComponentRepository(IMap<String, ComponentType> repo, String source) { this.repo = repo; this.source = source; } + @Override public IMap<String, ComponentType> getAll() { return repo; } |
