summaryrefslogtreecommitdiffstats
path: root/src/de/fhswf/in/inf/se/projektthemenvergabe/model/Organisation.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/fhswf/in/inf/se/projektthemenvergabe/model/Organisation.java')
-rw-r--r--src/de/fhswf/in/inf/se/projektthemenvergabe/model/Organisation.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/de/fhswf/in/inf/se/projektthemenvergabe/model/Organisation.java b/src/de/fhswf/in/inf/se/projektthemenvergabe/model/Organisation.java
index b9a6da4..ab90403 100644
--- a/src/de/fhswf/in/inf/se/projektthemenvergabe/model/Organisation.java
+++ b/src/de/fhswf/in/inf/se/projektthemenvergabe/model/Organisation.java
@@ -34,6 +34,27 @@ public class Organisation
}
/**
+ * Constructor of {@link Organisation}.
+ *
+ * @param name
+ * The name of the {@link Organisation}.
+ */
+ public Organisation(String name)
+ {
+ if (name == null)
+ {
+ throw new IllegalArgumentException("Name can't be null.");
+ }
+
+ if (name.isEmpty())
+ {
+ throw new IllegalArgumentException("Name can't be empty.");
+ }
+
+ this.name.set(name);
+ }
+
+ /**
* Getter for property name.
*
* @return Returns the name.