|
|||||||||||
| 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.DefaultAuthorDatabase
This class defines a default implementation for AuthorDatabaseInterface. It stores a list of Authors as an instance of DefaultAuthorGroup.
DefaultAuthorGroup,
AuthorDatabase| Constructor Summary | |
DefaultAuthorDatabase()
Creates a new instance for a AuthorDatabase |
|
| Method Summary | |
void |
addAuthor(Topic topic)
Adds an Author to the list |
void |
addAuthor(Topic topic,
int maximum_age)
Adds an Author to the list |
AuthorGroup |
getAuthors()
Returns the list of Authors in the Database |
Author |
getNextAuthor()
Returns the next Author in the database |
boolean |
hasMoreAuthors()
Tests whether the Database has more authors for iteration |
void |
removeAll()
Removes all the Authors from the database |
void |
resetSearchIndex()
Resets the Search Index so the Database can be searched iteratively |
int |
size()
Returns the number of Authors in the Database |
java.lang.String |
toString()
Returns the details of the AuthorDatabase as a String |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DefaultAuthorDatabase()
AuthorDatabase
| Method Detail |
public void addAuthor(Topic topic)
throws TarlException
Author to the list
addAuthor in interface AuthorDatabasetopic - Specifies the topic of the author
TarlException - if the new author cannot be initialized
public void addAuthor(Topic topic,
int maximum_age)
throws TarlException
Author to the list
addAuthor in interface AuthorDatabasetopic - Specifies the topic of the authormaximum_age - Specifies the maximum age of the author
TarlException - if the new author cannot be initializedpublic void removeAll()
Authors from the database
removeAll in interface AuthorDatabasepublic AuthorGroup getAuthors()
Authors in the Database
getAuthors in interface AuthorDatabasepublic int size()
Authors in the Database
size in interface AuthorDatabasepublic void resetSearchIndex()
resetSearchIndex in interface AuthorDatabasepublic boolean hasMoreAuthors()
hasMoreAuthors in interface AuthorDatabase
public Author getNextAuthor()
throws java.util.NoSuchElementException
Author in the database
getNextAuthor in interface AuthorDatabasejava.util.NoSuchElementException - if the iteration has no more authorspublic java.lang.String toString()
AuthorDatabase 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 | ||||||||||