public class UndoAssociation extends java.lang.Object implements Association
| Modifier and Type | Field and Description |
|---|---|
private UndoTopicMap |
topicMap |
private Association |
wrapped |
| Constructor and Description |
|---|
UndoAssociation(Association wrapped,
UndoTopicMap 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.
|
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 |
getWrapped() |
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.
|
private boolean |
undoCreated() |
private Association wrapped
private UndoTopicMap topicMap
UndoAssociation(Association wrapped, UndoTopicMap topicMap)
private boolean undoCreated()
throws TopicMapException
TopicMapExceptionpublic Association getWrapped()
public Topic getType() throws TopicMapException
AssociationgetType in interface AssociationTopicMapExceptionpublic void setType(Topic t) throws TopicMapException
AssociationsetType in interface AssociationTopicMapExceptionpublic Topic getPlayer(Topic role) throws TopicMapException
AssociationgetPlayer in interface AssociationTopicMapExceptionpublic void addPlayer(Topic player, Topic role) throws TopicMapException
AssociationaddPlayer in interface AssociationTopicMapExceptionpublic void addPlayers(java.util.Map<Topic,Topic> players) throws TopicMapException
AssociationaddPlayers in interface AssociationTopicMapExceptionpublic void removePlayer(Topic role) throws TopicMapException
AssociationremovePlayer in interface AssociationTopicMapExceptionpublic java.util.Collection<Topic> getRoles() throws TopicMapException
AssociationgetRoles in interface AssociationTopicMapExceptionpublic TopicMap getTopicMap()
AssociationgetTopicMap in interface Associationpublic void remove()
throws TopicMapException
Associationremove in interface AssociationTopicMapExceptionpublic boolean isRemoved()
throws TopicMapException
AssociationisRemoved in interface AssociationTopicMapExceptionCopyright 2004-2015 Wandora Team