Class Constitution
java.lang.Object
org.episteme.social.law.Constitution
- All Implemented Interfaces:
Named
-
Constructor Summary
ConstructorsConstructorDescriptionConstitution(String name, Date date, List<Article> articles) Creates a new Constitution object. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddArticle(Article article) Adds an article to the constitution.Returns the list of articles in the constitution.getDate()Returns the date when the constitution was established.getName()Returns the name of the organization or constitution.voidremoveArticle(Article article) Removes an article from the constitution.
-
Constructor Details
-
Constitution
Creates a new Constitution object.- Parameters:
name- the name of the constitutiondate- the date of adoption or proclamationarticles- the set of articles defining the constitution- Throws:
IllegalArgumentException- if any argument is null or if the list contains non-Article entities
-
-
Method Details
-
getName
-
getDate
-
getArticles
-
addArticle
Adds an article to the constitution.- Parameters:
article- the article to add- Throws:
IllegalArgumentException- if article is null
-
removeArticle
Removes an article from the constitution. Note: Articles are rarely removed from a constitution; usually, they are amended.- Parameters:
article- the article to remove
-