public class LinkedAssociation extends java.lang.Object implements Association
Modifier and Type | Field and Description |
---|---|
protected LinkedTopicMap |
topicMap |
protected Association |
wrappedAssociation |
Constructor and Description |
---|
LinkedAssociation(Association wrappedAssociation,
LinkedTopicMap topicMap) |
Modifier and Type | Method and Description |
---|---|
void |
addPlayer(Topic player,
Topic role)
Sets the player with the specified role replacing previous player with
that role if it exists already.
|
void |
addPlayers(java.util.Map<Topic,Topic> players)
Adds players to the association.
|
boolean |
equals(java.lang.Object o) |
Topic |
getPlayer(Topic role)
Gets the player with the specified role.
|
java.util.Collection<Topic> |
getRoles()
Gets a Collection of Topics containing the roles of this association.
|
TopicMap |
getTopicMap()
Gets the topic map this association belongs to.
|
Topic |
getType()
Gets the type of this association.
|
Association |
getWrappedAssociation() |
int |
hashCode() |
boolean |
isRemoved()
Tests if this association has been removed and thus this object is now
invalid.
|
void |
remove()
Removes this association.
|
void |
removePlayer(Topic role)
Removes the player with the specified role.
|
void |
setType(Topic t)
Sets the type of this association replacing the previous type.
|
protected Association wrappedAssociation
protected LinkedTopicMap topicMap
public LinkedAssociation(Association wrappedAssociation, LinkedTopicMap topicMap)
public Association getWrappedAssociation()
public void addPlayer(Topic player, Topic role) throws TopicMapException
Association
addPlayer
in interface Association
TopicMapException
public void addPlayers(java.util.Map<Topic,Topic> players) throws TopicMapException
Association
addPlayers
in interface Association
TopicMapException
public Topic getPlayer(Topic role) throws TopicMapException
Association
getPlayer
in interface Association
TopicMapException
public java.util.Collection<Topic> getRoles() throws TopicMapException
Association
getRoles
in interface Association
TopicMapException
public TopicMap getTopicMap()
Association
getTopicMap
in interface Association
public Topic getType() throws TopicMapException
Association
getType
in interface Association
TopicMapException
public boolean isRemoved() throws TopicMapException
Association
isRemoved
in interface Association
TopicMapException
public void remove() throws TopicMapException
Association
remove
in interface Association
TopicMapException
public void removePlayer(Topic role) throws TopicMapException
Association
removePlayer
in interface Association
TopicMapException
public void setType(Topic t) throws TopicMapException
Association
setType
in interface Association
TopicMapException
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Copyright 2004-2015 Wandora Team