|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface defines the TopicDatabase which is used to store all the Topics ever produced in the system. The functions are responsible for actions like initializing the database, adding a new Topic to the database, iterating through each Topic of the database, removing all the Topics from the database, etc.
Apart from these functions, the major responsibility of the database is to tag each Topic with a unique identifier which distinguishes it from other Topics.
TopicGroup,
TopicManager| Method Summary | |
void |
addTopic()
Adds a new default Topic to the database. |
Topic |
getNextTopic()
Returns the next Topic in the database while iteration |
TopicGroup |
getTopics()
Returns all the Topics in the database |
boolean |
hasMoreTopics()
Tests whether the database has more Topics for iteration |
void |
removeAll()
Removes all the Topics from the database |
void |
resetSearchIndex()
Resets the Search Index to the start of the list of Topics. |
int |
size()
Returns the number of Topics in the database |
| Method Detail |
public void addTopic()
Topic to the database. The system should store the Topic for retreival in the future.
public TopicGroup getTopics()
Topics in the database
public int size()
Topics in the database
public void resetSearchIndex()
Topics. This function is called just before iterating through the Topics.
public boolean hasMoreTopics()
Topics for iteration
public Topic getNextTopic()
throws java.util.NoSuchElementException
Topic in the database while iteration
java.util.NoSuchElementException - if the database has no more topicspublic void removeAll()
Topics from the database
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||