diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-03-22 12:28:35 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-03-22 12:28:35 -0400 |
| commit | 01cb9f504c860bc1c037a44f3a76bf342a293d46 (patch) | |
| tree | 02d1d34de0828159bbda93e881c93a6b45720f32 /BJC-Utils2/src/main/java/bjc/utils/components | |
| parent | 4685955a62c430007c5c8ed2b915ffc618d30aca (diff) | |
General formatting cleanup and documentation update
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/components')
4 files changed, 37 insertions, 30 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java b/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java index 5923f26..3cb16b4 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java +++ b/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java @@ -2,33 +2,39 @@ package bjc.utils.components; /** * Generic implementation of a description for a component + * * @author ben * */ public class ComponentDescription implements IDescribedComponent { /** - * The name of the component - */ - private String name; - /** * The author of the component */ - private String author; + private String author; /** * The description of the component */ - private String description; + private String description; + /** + * The name of the component + */ + private String name; /** * The version of the component */ - private int version; - + private int version; + /** * Create a new component description - * @param name The name of the component - * @param author The author of the component - * @param description The description of the component - * @param version The version of the component + * + * @param name + * The name of the component + * @param author + * The author of the component + * @param description + * The description of the component + * @param version + * The version of the component */ public ComponentDescription(String name, String author, String description, int version) { @@ -39,20 +45,20 @@ public class ComponentDescription implements IDescribedComponent { } @Override - public String getName() { - return name; - } - - @Override public String getAuthor() { return author; } - + @Override public String getDescription() { return description; } - + + @Override + public String getName() { + return name; + } + @Override public int getVersion() { return version; diff --git a/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java b/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java index 9dd881c..0d25e68 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java +++ b/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java @@ -86,5 +86,4 @@ public class FileComponentRepository<E extends IDescribedComponent> public String getSource() { return "Read from directory " + sourcePath + "."; } - } diff --git a/BJC-Utils2/src/main/java/bjc/utils/components/IComponentRepository.java b/BJC-Utils2/src/main/java/bjc/utils/components/IComponentRepository.java index a326a78..43d5919 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/components/IComponentRepository.java +++ b/BJC-Utils2/src/main/java/bjc/utils/components/IComponentRepository.java @@ -9,6 +9,8 @@ import bjc.utils.funcdata.FunctionalList; * * @author ben * + * @param <E> + * The type of components contained in this repository */ public interface IComponentRepository<E extends IDescribedComponent> { /** diff --git a/BJC-Utils2/src/main/java/bjc/utils/components/IDescribedComponent.java b/BJC-Utils2/src/main/java/bjc/utils/components/IDescribedComponent.java index f1d8b1c..15be70d 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/components/IDescribedComponent.java +++ b/BJC-Utils2/src/main/java/bjc/utils/components/IDescribedComponent.java @@ -9,13 +9,15 @@ package bjc.utils.components; */ public interface IDescribedComponent { /** - * Get the name of this component. + * Get the author of this component * - * This is the only thing required of all components + * Providing this is optional, with "Anonymous" as the default author * - * @return The name of the component + * @return The author of the component */ - public String getName(); + public default String getAuthor() { + return "Anonymous"; + } /** * Get the description of this component @@ -30,15 +32,13 @@ public interface IDescribedComponent { } /** - * Get the author of this component + * Get the name of this component. * - * Providing this is optional, with "Anonymous" as the default author + * This is the only thing required of all components * - * @return The author of the component + * @return The name of the component */ - public default String getAuthor() { - return "Anonymous"; - } + public String getName(); /** * Get the version of this component |
