|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--edu.iu.iv.modeling.tarl.topic.impl.DefaultTopic
This class provides a default implementation of the TopicInterface. It represents the identifier of the topic as an integer; it associates a name with each Topic and it associates a list of keywords as an ExtendedHashSet.
DefaultAuthor,
DefaultPublication,
Topic| Constructor Summary | |
DefaultTopic()
Creates a new instance for a default Topic. |
|
DefaultTopic(int id)
Creates a new instance for a Topic with the specified id. |
|
DefaultTopic(int id,
java.lang.String name)
Creates a new instance for a Topic with the specified id, and the specified name |
|
DefaultTopic(int id,
java.lang.String name,
ExtendedHashSet keywords)
Creates a new instance for a DefaultTopic with the specified id, name and Topic |
|
| Method Summary | |
boolean |
equals(Topic topic)
Tests whether the current Topic is the same as the Topic given by the parameter |
int |
getId()
Returns the id of the Topic |
ExtendedHashSet |
getKeywords()
Returns the keywords of the Topic |
java.lang.String |
getName()
Returns the name of the Topic |
void |
initialize(int id)
Initializes the Topic with the given integer identification |
void |
setKeywords(java.util.Collection keywords)
Stores the list of keywords of the Topic |
void |
setName(java.lang.String name)
Stores the name of the Topic as a String |
java.lang.String |
toString()
Return the details of the Topic as a String |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DefaultTopic()
Topic.
public DefaultTopic(int id)
Topic with the specified id. A Topic must have an id at the very least.
id - Specifies the unique id for the newly instantiated topic
public DefaultTopic(int id,
java.lang.String name)
throws java.lang.NullPointerException
Topic with the specified id, and the specified name
id - Specifies the unique id for the newly instantiated topicname - Specifies the name of the newly instantiated topic
java.lang.NullPointerException - if the specified name is null
public DefaultTopic(int id,
java.lang.String name,
ExtendedHashSet keywords)
throws java.lang.NullPointerException
DefaultTopic with the specified id, name and Topic
id - Specifies the unique id for the newly instantiated topicname - Specifies the name of the newly instantiated topickeywords - Specifies the extended hashset of keywords for the newly instantiated topic
java.lang.NullPointerException - if the specified name is null| Method Detail |
public void initialize(int id)
Topic with the given integer identification
initialize in interface Topicid - Specifies the integer id used for identificationpublic int getId()
Topic
getId in interface Topicpublic java.lang.String getName()
Topic
public ExtendedHashSet getKeywords()
Topic
public void setName(java.lang.String name)
Topic as a String
name - Specifies the name of the topicpublic void setKeywords(java.util.Collection keywords)
Topic
keywords - Specifies the collection of keywordspublic boolean equals(Topic topic)
Topic is the same as the Topic given by the parameter
equals in interface Topictopic - Specifies the topic to be equated against
public java.lang.String toString()
Topic 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 | ||||||||||