Class Treaty
java.lang.Object
org.episteme.social.law.Treaty
- All Implemented Interfaces:
Named
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddArticle(Article article) Adds an article to the treaty.voidaddGroup(HumanGroup group) Adds a group to the treaty.Returns an unmodifiable view of the treaty articles.getDate()Returns the signing date.Returns an unmodifiable view of the participating groups.getName()Returns the name of the treaty.voidremoveArticle(Article article) Removes an article from the treaty.voidremoveGroup(HumanGroup group) Removes a group from the treaty.
-
Constructor Details
-
Treaty
Creates a new Treaty.- Parameters:
name- the name (cannot be empty)date- the signing dategroups- the participating groupsarticles- the treaty articles- Throws:
NullPointerException- if any argument is nullIllegalArgumentException- if name is empty
-
-
Method Details
-
getName
-
getDate
-
getGroups
Returns an unmodifiable view of the participating groups.- Returns:
- the groups
-
addGroup
Adds a group to the treaty.- Parameters:
group- the group to add- Throws:
NullPointerException- if group is null
-
removeGroup
Removes a group from the treaty.- Parameters:
group- the group to remove
-
getArticles
-
addArticle
Adds an article to the treaty.- Parameters:
article- the article to add- Throws:
NullPointerException- if article is null
-
removeArticle
Removes an article from the treaty.- Parameters:
article- the article to remove
-