edu.iu.iv.modeling.tarl.topic
Interface Topic

All Known Implementing Classes:
DefaultTopic

public interface Topic

This interface defines a Topic by defining the necessary functions it should support. Each Author and Publication possess a Topic as an attribute.
All Topics should also support an identification tag that the TopicDatabase provides to enable other classes to distinguish between different Topics.

Author:
Jeegar T Maru
See Also:
TopicDatabase

Method Summary
 boolean equals(Topic topicInterface)
          Tests whether the current Topic is the same as the specified one.
 int getId()
          Returns the unique identifier assigned by the TopicDatabaseInterface of the Topic as an integer
 void initialize(int id)
          Initialize the Topic with the given integer as the unique identifier.
 

Method Detail

getId

public int getId()
Returns the unique identifier assigned by the TopicDatabaseInterface of the Topic as an integer

Returns:
the unique identifier of the topic

initialize

public void initialize(int id)
Initialize the Topic with the given integer as the unique identifier. This method should be called by a TopicDatabaseInterface just after creating a new Topic.

Parameters:
id - Specifies the unique identifier for the topic

equals

public boolean equals(Topic topicInterface)
Tests whether the current Topic is the same as the specified one. This test should be based on the identification tag that the TopicDatabase has assigned to both the Topics.

Parameters:
topicInterface - Specifies the topic to be equated against
Returns:
true, if the current topic is equal to the specified one