|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--edu.iu.iv.modeling.tarl.author.impl.DefaultAuthor
This class defines a default implementation for the AuthorInterface. The implementation stores the following properties of the Author :
TopicInterface Author as an integer Author as an integer
Topic,
Author| Constructor Summary | |
DefaultAuthor()
Creates a new instance for an Author with the specified id and Topic. |
|
DefaultAuthor(int id,
Topic topic)
Creates a new instance for an Author with the specified id and Topic. |
|
DefaultAuthor(int id,
Topic topic,
int maximum_age)
Creates a new instance for an Author with the specified id, Topic and maximum age |
|
| Method Summary | |
void |
deactivate()
Notifies the Author of deactivation. |
boolean |
equals(Author author)
Tests whether the current Author is the same as the Author given by the parameter |
int |
getAge()
Returns the age of the Author |
int |
getId()
Returns the id of the Author |
int |
getMaximumAge()
Returns the maximum age of the Author
|
Topic |
getTopic()
Returns the Topic of the Author
|
void |
initialize(int id,
Topic topic)
Initializes the Author with the specified identifier and Topic |
void |
initialize(int id,
Topic topic,
int maximum_age)
Initializes the Author with the specified identifier, Topic and the maximum age |
boolean |
isActive()
Tests whether the Author is active for the current year |
java.lang.String |
toString()
Returns the details of the Author as a String |
void |
yearEndNotification()
Notifies the Author that the current year has terminated. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DefaultAuthor()
Author with the specified id and Topic. An Author should have an id and a Topic at the very least. Assumes that the maximum age of the Author is infinity.
public DefaultAuthor(int id,
Topic topic)
throws TarlException
Author with the specified id and Topic. An Author should have an id and a Topic at the very least. Assumes that the maximum age of the Author is infinity.
id - Specifies the unique id for the newly instantiated authortopic - Specifies the topic for the newly instantiated author
TarlException - if the specified topic is null
public DefaultAuthor(int id,
Topic topic,
int maximum_age)
throws TarlException
Author with the specified id, Topic and maximum age
id - Specifies the unique id for the newly instantiated authortopic - Specifies the topic for the newly instantiated authormaximum_age - Specifies the maximum age for the newly instantiated author
TarlException - if the specified topic is null| Method Detail |
public void initialize(int id,
Topic topic)
Author with the specified identifier and Topic
initialize in interface Authorid - Specifies the unique identifier of the authortopic - Specifies the topic of the author
public void initialize(int id,
Topic topic,
int maximum_age)
Author with the specified identifier, Topic and the maximum age
initialize in interface Authorid - Specifies the unique identifier of the authortopic - Specifies the topic of the authormaximum_age - Specifies the maximum age of the authorpublic int getId()
Author
getId in interface Authorpublic Topic getTopic()
Topic of the Author
getTopic in interface Authorpublic int getMaximumAge()
Author
public int getAge()
Author
public boolean equals(Author author)
Author is the same as the Author given by the parameter
equals in interface Authorauthor - Specifies the author to be equated against
public boolean isActive()
Author is active for the current year
isActive in interface Authorpublic void deactivate()
Author of deactivation. Asks the Author to not produce any Publications henceforth.
deactivate in interface Authorpublic void yearEndNotification()
Author that the current year has terminated. Allows the Author to increment his/her age or do book-keeping activities.
yearEndNotification in interface Authorpublic java.lang.String toString()
Author as a String
toString in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||