summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/components/IDescribedComponent.java
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2016-03-01 20:43:51 -0500
committerbculkin2442 <bjculkin@mix.wvu.edu>2016-03-01 20:43:51 -0500
commit120ac7034bcfa91a02b1b68c0507fd3ef80a0cfa (patch)
tree0993dee8c50638561e8a5bce18d86dcd9842e0ec /BJC-Utils2/src/main/java/bjc/utils/components/IDescribedComponent.java
parentdf852b8a67f4b8f1c3e6f89d8c3630e678c49c14 (diff)
Implemented support for component-based shenanigans.
By default, only a source for retrieving components from streams is implemented
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/components/IDescribedComponent.java')
-rw-r--r--BJC-Utils2/src/main/java/bjc/utils/components/IDescribedComponent.java53
1 files changed, 53 insertions, 0 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/components/IDescribedComponent.java b/BJC-Utils2/src/main/java/bjc/utils/components/IDescribedComponent.java
new file mode 100644
index 0000000..f1d8b1c
--- /dev/null
+++ b/BJC-Utils2/src/main/java/bjc/utils/components/IDescribedComponent.java
@@ -0,0 +1,53 @@
+package bjc.utils.components;
+
+/**
+ * Represents a optional component that has status information associated
+ * with it
+ *
+ * @author ben
+ *
+ */
+public interface IDescribedComponent {
+ /**
+ * Get the name of this component.
+ *
+ * This is the only thing required of all components
+ *
+ * @return The name of the component
+ */
+ public String getName();
+
+ /**
+ * Get the description of this component
+ *
+ * Providing this is optional, with the default being a note that no
+ * description was provided
+ *
+ * @return The description of the component
+ */
+ public default String getDescription() {
+ return "No description provided.";
+ }
+
+ /**
+ * Get the author of this component
+ *
+ * Providing this is optional, with "Anonymous" as the default author
+ *
+ * @return The author of the component
+ */
+ public default String getAuthor() {
+ return "Anonymous";
+ }
+
+ /**
+ * Get the version of this component
+ *
+ * Providing this is optional, with "1" as the default version
+ *
+ * @return The version of this component
+ */
+ public default int getVersion() {
+ return 1;
+ }
+}