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.Object
public int hashCode()
hashCode
in class java.lang.Object
protected void ambiguity(java.lang.String s)
public Topic getType()
Association
getType
in interface Association
public void setType(Topic t) throws TopicMapException
Association
setType
in interface Association
TopicMapException
public Topic getPlayer(Topic role)
Association
getPlayer
in interface Association
public boolean associationMatchesThis(Association a) throws TopicMapException
TopicMapException
public Association findAssociationForLayer(Layer l) throws TopicMapException
TopicMapException
public java.util.Collection<Association> findAssociationsForLayer(Layer l) throws TopicMapException
TopicMapException
public Association findAssociationForSelectedLayer() throws TopicMapException
TopicMapException
void addLayeredPlayer(LayeredTopic player, LayeredTopic role)
public void addPlayer(Topic player, Topic role) throws TopicMapException
addPlayer
in interface Association
TopicMapException
public void addPlayers(java.util.Map<Topic,Topic> players) throws TopicMapException
Association
addPlayers
in interface Association
TopicMapException
public void removePlayer(Topic role) throws TopicMapException
Association
removePlayer
in interface Association
TopicMapException
public java.util.Collection<Topic> getRoles()
Association
getRoles
in interface Association
public TopicMap getTopicMap()
Association
getTopicMap
in interface Association
public void remove() throws TopicMapException
Association
remove
in interface Association
TopicMapException
public boolean isRemoved() throws TopicMapException
Association
isRemoved
in interface Association
TopicMapException
Copyright 2004-2015 Wandora Team