public class AssociationImpl extends java.lang.Object implements Association
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<Topic,Topic> |
players |
private boolean |
removed |
private TopicMapImpl |
topicMap |
private Topic |
type |
| Constructor and Description |
|---|
AssociationImpl(TopicMapImpl topicMap,
Topic type)
Creates a new instance of AssociationImpl
|
| Modifier and Type | Method and Description |
|---|---|
(package private) boolean |
_equals(AssociationImpl a) |
(package private) int |
_hashCode() |
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> newPlayers)
Adds players to the association.
|
(package private) void |
checkRedundancy() |
Topic |
getPlayer(Topic role)
Gets the player with the specified role.
|
java.util.Collection |
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.
|
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 TopicMapImpl topicMap
private Topic type
private boolean removed
public AssociationImpl(TopicMapImpl topicMap, Topic type) throws TopicMapException
TopicMapExceptionpublic Topic getPlayer(Topic role)
AssociationgetPlayer in interface Associationpublic java.util.Collection getRoles()
AssociationgetRoles in interface Associationpublic TopicMap getTopicMap()
AssociationgetTopicMap in interface Associationpublic Topic getType()
AssociationgetType in interface Associationpublic void setType(Topic t) throws TopicMapException
AssociationsetType in interface AssociationTopicMapExceptionpublic void addPlayer(Topic player, Topic role) throws TopicMapException
AssociationaddPlayer in interface AssociationTopicMapExceptionpublic void addPlayers(java.util.Map<Topic,Topic> newPlayers) throws TopicMapException
AssociationaddPlayers in interface AssociationTopicMapExceptionpublic void removePlayer(Topic role) throws TopicMapException
AssociationremovePlayer in interface AssociationTopicMapExceptionpublic void remove()
throws TopicMapException
Associationremove in interface AssociationTopicMapExceptionpublic boolean isRemoved()
AssociationisRemoved in interface Associationvoid checkRedundancy()
throws TopicMapException
TopicMapExceptionint _hashCode()
boolean _equals(AssociationImpl a)
Copyright 2004-2015 Wandora Team