diff options
| author | EVE <EVE@EVE-PC> | 2017-03-14 12:07:14 -0400 |
|---|---|---|
| committer | EVE <EVE@EVE-PC> | 2017-03-14 12:07:14 -0400 |
| commit | 504ca816530efdff06bc202e0432ebd354aec304 (patch) | |
| tree | 4836932fb81d1d625470502c78c94d202c9a7420 /BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java | |
| parent | 5c1163df17c46f7d3e15b6c7949c38843ec56146 (diff) | |
Cleanup
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java | 24 |
1 files changed, 9 insertions, 15 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 c473150..13132ed 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java +++ b/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java @@ -2,31 +2,29 @@ package bjc.utils.components; /** * Generic implementation of a description for a component - * + * * @author ben * */ public class ComponentDescription implements IDescribedComponent { private static void sanityCheckArgs(String name, String author, String description, int version) { - if (name == null) { + if(name == null) throw new NullPointerException("Component name can't be null"); - } else if (version <= 0) { - throw new IllegalArgumentException("Component version must be greater than 0"); - } + else if(version <= 0) throw new IllegalArgumentException("Component version must be greater than 0"); } /** * 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; + private String name; /** * The version of the component @@ -35,7 +33,7 @@ public class ComponentDescription implements IDescribedComponent { /** * Create a new component description - * + * * @param name * The name of the component * @param author @@ -58,18 +56,14 @@ public class ComponentDescription implements IDescribedComponent { @Override public String getAuthor() { - if (author == null) { - return IDescribedComponent.super.getAuthor(); - } + if(author == null) return IDescribedComponent.super.getAuthor(); return author; } @Override public String getDescription() { - if (description == null) { - return IDescribedComponent.super.getDescription(); - } + if(description == null) return IDescribedComponent.super.getDescription(); return description; } |
