vanted.petrinetelements
Class Place

java.lang.Object
  extended by vanted.petrinetelements.NodePN
      extended by vanted.petrinetelements.Place

public class Place
extends NodePN

The Class Place for place handling.

Author:
Kevin Pucknat

Constructor Summary
Place(org.graffiti.graph.Node node)
          Instantiates a new place.
 
Method Summary
 void addCapacity(Capacity capacity)
          Adds the capacity of a place (if the place is a logical place then the capacities of the associated places are also added).
 void addInArc(OutArc arc)
          Adds the in arc of a place.
 void addNode(org.graffiti.graph.Node node)
          Adds the node and the attributes: Draw, IgnoreNode and Reachability.
 void addOutArc(InArc arc)
          Adds the out arc of a place.
 void addToken(AbstractToken token)
          Adds the token of a place (if the place is a logical place then this token of the associated places is also added).
 void clearTokens()
          Clears all tokens (discrete, continuous) of a place (if the place is a logical place then all tokens of the associated places are also cleared).
 java.util.List<AbstractArc> getArcs()
          Gets the arcs of a place.
 Capacity getCapacity()
          Gets the capacity of a place.
 java.util.List<OutArc> getInArcs()
          Gets the in arcs of a place.
 java.util.List<InArc> getOutArcs()
          Gets the out arcs of a place.
 java.util.List<AbstractToken> getTokens()
          Gets the tokens of a place.
 java.util.List<TokenContinuous> getTokensContinuous()
          Gets the continuous tokens of a place.
 java.util.List<AbstractToken> getTokensDiscrete()
          Gets the discrete tokens of a place.
static boolean isPlace(org.graffiti.graph.Node nd)
          Checks if the node is a place.
 void removeAllToken()
          Removes the all token of a place (if the place is a logical place then all tokens of the associated places are also removed).
 void removeCapacity()
          Removes the capacity of a place (if the place is a logical place then the capacities of the associated places are also removed).
 boolean removeNode(org.graffiti.graph.Node node)
          Removes the node and the attributes: Draw, IgnoreNode and Reachability.
 void removeToken(AbstractToken token)
          Removes the token of a place (if the place is a logical place then this token of the associated places is also removed).
 void setInArcs(java.util.List<InArc> inArcs)
          Sets the in arcs of a place.
 void setOutArcs(java.util.List<OutArc> outArcs)
          Sets the out arcs of a place.
 
Methods inherited from class vanted.petrinetelements.NodePN
addDraw, addIdentity, addIgnoreNode, addReachability, getDraw, getID, getIdentity, getIgnoreNode, getName, getNode, getNodes, getReachability, removeDraw, removeIdentity, removeIgnoreNode, removeReachability, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Place

public Place(org.graffiti.graph.Node node)
Instantiates a new place.

Parameters:
node - the node
Method Detail

addNode

public void addNode(org.graffiti.graph.Node node)
Description copied from class: NodePN
Adds the node and the attributes: Draw, IgnoreNode and Reachability.

Overrides:
addNode in class NodePN
Parameters:
node - the node

removeNode

public boolean removeNode(org.graffiti.graph.Node node)
Description copied from class: NodePN
Removes the node and the attributes: Draw, IgnoreNode and Reachability.

Overrides:
removeNode in class NodePN
Parameters:
node - the node
Returns:
true, if successful

addToken

public void addToken(AbstractToken token)
Adds the token of a place (if the place is a logical place then this token of the associated places is also added).

Parameters:
token - the token

removeToken

public void removeToken(AbstractToken token)
Removes the token of a place (if the place is a logical place then this token of the associated places is also removed).

Parameters:
token - the token

removeAllToken

public void removeAllToken()
Removes the all token of a place (if the place is a logical place then all tokens of the associated places are also removed).


getTokens

public java.util.List<AbstractToken> getTokens()
Gets the tokens of a place.

Returns:
the tokens

getTokensDiscrete

public java.util.List<AbstractToken> getTokensDiscrete()
Gets the discrete tokens of a place.

Returns:
the tokens

getTokensContinuous

public java.util.List<TokenContinuous> getTokensContinuous()
Gets the continuous tokens of a place.

Returns:
the tokens

isPlace

public static boolean isPlace(org.graffiti.graph.Node nd)
Checks if the node is a place.

Parameters:
nd - the nd
Returns:
true, if is place

addOutArc

public void addOutArc(InArc arc)
Adds the out arc of a place.

Parameters:
arc - the arc

setInArcs

public void setInArcs(java.util.List<InArc> inArcs)
Sets the in arcs of a place.

Parameters:
inArcs - the new in arcs

getOutArcs

public java.util.List<InArc> getOutArcs()
Gets the out arcs of a place.

Returns:
the out arcs

addInArc

public void addInArc(OutArc arc)
Adds the in arc of a place.

Parameters:
arc - the arc

setOutArcs

public void setOutArcs(java.util.List<OutArc> outArcs)
Sets the out arcs of a place.

Parameters:
outArcs - the new out arcs

getInArcs

public java.util.List<OutArc> getInArcs()
Gets the in arcs of a place.

Returns:
the in arcs

getArcs

public java.util.List<AbstractArc> getArcs()
Gets the arcs of a place.

Returns:
the arcs

addCapacity

public void addCapacity(Capacity capacity)
Adds the capacity of a place (if the place is a logical place then the capacities of the associated places are also added).

Parameters:
capacity - the capacity

removeCapacity

public void removeCapacity()
Removes the capacity of a place (if the place is a logical place then the capacities of the associated places are also removed).


getCapacity

public Capacity getCapacity()
Gets the capacity of a place.

Returns:
the capacity

clearTokens

public void clearTokens()
Clears all tokens (discrete, continuous) of a place (if the place is a logical place then all tokens of the associated places are also cleared).