diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-03-28 19:59:48 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-03-28 19:59:48 -0400 |
| commit | f4c758dc79b704865ac5ae96c6e48aac6ab1d097 (patch) | |
| tree | 1e3b3022626a2468969a9daf607f65e6c885a15d /BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescriptionState.java | |
| parent | 903249252ac188be1f90038e3f1a70b15314b6a7 (diff) | |
Added parser for component descriptions
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescriptionState.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescriptionState.java | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescriptionState.java b/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescriptionState.java new file mode 100644 index 0000000..6c374be --- /dev/null +++ b/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescriptionState.java @@ -0,0 +1,66 @@ +package bjc.utils.components; + +/** + * Internal state of component description parser + * + * @author ben + * + */ +public class ComponentDescriptionState { + private String name; + private String description; + + private String author; + + private int version; + + /** + * Convert this state into the description it represents + * + * @return The description represented by this state + */ + public ComponentDescription toDescription() { + return new ComponentDescription(name, author, description, + version); + } + + /** + * Set the name of this component + * + * @param name + * The name of this component + */ + public void setName(String name) { + this.name = name; + } + + /** + * Set the description of this component + * + * @param description + * The description of this component + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * Set the author of this component + * + * @param author + * The author of this component + */ + public void setAuthor(String author) { + this.author = author; + } + + /** + * Set the version of this component + * + * @param version + * The version of this component + */ + public void setVersion(int version) { + this.version = version; + } +} |
