public class LayeredAssociation extends java.lang.Object implements Association
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Integer |
hashCode |
protected LayerStack |
layerStack |
protected KeyedHashMap<LayeredTopic,LayeredTopic> |
players |
protected LayeredTopic |
type |
| Constructor and Description |
|---|
LayeredAssociation(LayerStack layerStack,
LayeredTopic type)
Creates a new instance of LayeredAssociation
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
addLayeredPlayer(LayeredTopic player,
LayeredTopic role)
Adds a player to this LayeredAssociation object.
|
void |
addPlayer(Topic player,
Topic role)
Adds a player to the association and modifies the appropriate individual
association accordingly.
|
void |
addPlayers(java.util.Map<Topic,Topic> players)
Adds players to the association.
|
protected void |
ambiguity(java.lang.String s) |
boolean |
associationMatchesThis(Association a)
Checks if the given non layered association matches this association.
|
boolean |
equals(java.lang.Object o) |
Association |
findAssociationForLayer(Layer l)
Finds an association in the given layer that matches this LayredAssociation.
|
Association |
findAssociationForSelectedLayer() |
java.util.Collection<Association> |
findAssociationsForLayer(Layer l)
Finds all associations in the given layer that match this LayeredAssociation.
|
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.
|
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 LayeredTopic type
protected LayerStack layerStack
protected KeyedHashMap<LayeredTopic,LayeredTopic> players
private java.lang.Integer hashCode
public LayeredAssociation(LayerStack layerStack, LayeredTopic type)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectprotected void ambiguity(java.lang.String s)
public Topic getType()
AssociationgetType in interface Associationpublic void setType(Topic t) throws TopicMapException
AssociationsetType in interface AssociationTopicMapExceptionpublic Topic getPlayer(Topic role)
AssociationgetPlayer in interface Associationpublic boolean associationMatchesThis(Association a) throws TopicMapException
TopicMapExceptionpublic Association findAssociationForLayer(Layer l) throws TopicMapException
TopicMapExceptionpublic java.util.Collection<Association> findAssociationsForLayer(Layer l) throws TopicMapException
TopicMapExceptionpublic Association findAssociationForSelectedLayer() throws TopicMapException
TopicMapExceptionvoid addLayeredPlayer(LayeredTopic player, LayeredTopic role)
public void addPlayer(Topic player, Topic role) throws TopicMapException
addPlayer 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()
AssociationgetRoles in interface Associationpublic 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