|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatt.grappa.Element
att.grappa.Node
org.processmining.framework.models.ModelGraphVertex
org.processmining.framework.models.petrinet.PNNode
org.processmining.framework.models.petrinet.Place
public class Place
A place is node in a Petri net. It is the passive component in the Petri net structure, and may hold zero to an arbitrary number of tokens. The marking of all the places in the net relates to the state of the Petri net.
Token
,
Transition
,
PetriNet
Field Summary |
---|
Fields inherited from class org.processmining.framework.models.ModelGraphVertex |
---|
identifier, object2, value, visualObject |
Fields inherited from class att.grappa.Node |
---|
defaultNamePrefix |
Fields inherited from class att.grappa.Element |
---|
counter, highlight, linewidth, object, printAllAttributes, printDefaultAttributes, usePrintList, visible |
Fields inherited from interface att.grappa.GrappaConstants |
---|
_NO_TYPE, ANONYMOUS_PREFIX, BBOX_ATTR, BBOX_HASH, BOX_SHAPE, BOX_TYPE, CLUSTERRANK_ATTR, COLOR_ATTR, COLOR_HASH, COLOR_TYPE, CUSTOM_ATTR, CUSTOM_HASH, CUSTOM_SHAPE, DELETION_MASK, DIAMOND_SHAPE, DIR_ATTR, DIR_HASH, DIR_TYPE, DISTORTION_ATTR, DISTORTION_HASH, DOUBLE_TYPE, DOUBLECIRCLE_SHAPE, DOUBLEOCTAGON_SHAPE, EDGE, EGG_SHAPE, FILLCOLOR_ATTR, FILLCOLOR_HASH, FONTCOLOR_ATTR, FONTCOLOR_HASH, FONTNAME_ATTR, FONTNAME_HASH, FONTSIZE_ATTR, FONTSIZE_HASH, FONTSTYLE_ATTR, FONTSTYLE_HASH, FONTSTYLE_TYPE, GRAPPA_BACKGROUND_COLOR_ATTR, GRAPPA_BACKGROUND_COLOR_HASH, GRAPPA_DELETION_STYLE_ATTR, GRAPPA_DELETION_STYLE_HASH, GRAPPA_FONTSIZE_ADJUSTMENT_ATTR, GRAPPA_FONTSIZE_ADJUSTMENT_HASH, GRAPPA_SELECTION_STYLE_ATTR, GRAPPA_SELECTION_STYLE_HASH, GRAPPA_SHAPE, HASHLIST_TYPE, HEIGHT_ATTR, HEIGHT_HASH, HEXAGON_SHAPE, HIGHLIGHT_MASK, HIGHLIGHT_OFF, HIGHLIGHT_ON, HIGHLIGHT_TOGGLE, HOUSE_SHAPE, IDENTXFRM, IMAGE_ATTR, IMAGE_HASH, INTEGER_TYPE, INVERTEDHOUSE_SHAPE, INVERTEDTRAPEZIUM_SHAPE, INVERTEDTRIANGLE_SHAPE, LABEL_ATTR, LABEL_HASH, LINE_SHAPE, LINE_TYPE, LOG10, LP_ATTR, LP_HASH, MARGIN_ATTR, MARGIN_HASH, MCIRCLE_SHAPE, MCLIMIT_ATTR, MCLIMIT_HASH, MDIAMOND_SHAPE, MINBOX_ATTR, MINBOX_HASH, MINLEN_ATTR, MINLEN_HASH, MINSIZE_ATTR, MINSIZE_HASH, MRECORD_SHAPE, MSQUARE_SHAPE, NBSP, NEW_LINE, NO_SHAPE, NODE, NODESEP_ATTR, NODESEP_HASH, OCTAGON_SHAPE, ORIENTATION_ATTR, ORIENTATION_HASH, OVAL_SHAPE, PACKAGE_PREFIX, PARALLELOGRAM_SHAPE, PATCH_ATTR, PATCH_HASH, PENTAGON_SHAPE, PERIPHERIES_ATTR, PERIPHERIES_HASH, PERIPHERY_GAP, PKG_LOWER, PKG_UPLOW, PKG_UPPER, PLAINTEXT_SHAPE, POINT_TYPE, PointsPerInch, POLYGON_SHAPE, POS_ATTR, POS_HASH, PRINTLIST_ATTR, PRINTLIST_HASH, RANKDIR_ATTR, RANKDIR_HASH, RANKSEP_ATTR, RANKSEP_HASH, RECORD_SHAPE, RECTS_ATTR, RECTS_HASH, ROTATION_ATTR, ROTATION_HASH, ROUNDEDBOX_SHAPE, SELECTION_MASK, SHAPE_ATTR, SHAPE_HASH, SHAPE_MASK, SHAPE_TYPE, SIDES_ATTR, SIDES_HASH, SIZE_ATTR, SIZE_HASH, SIZE_TYPE, SKEW_ATTR, SKEW_HASH, STRING_TYPE, STYLE_ATTR, STYLE_HASH, STYLE_TYPE, SUBGRAPH, SYSTEM, TAG_ATTR, TAG_HASH, TIP_ATTR, TIP_HASH, TRAPEZIUM_SHAPE, TRIANGLE_SHAPE, TRIPLEOCTAGON_SHAPE, TYPES_SHIFT, WEIGHT_ATTR, WEIGHT_HASH, WIDTH_ATTR, WIDTH_HASH |
Constructor Summary | |
---|---|
Place(java.lang.String identifier,
PetriNet net)
Constructor. |
Method Summary | |
---|---|
Token |
addToken(Token to)
Adds the specified token to this place. |
java.lang.Object |
clone()
Make a deep copy of the object. |
int |
compareTo(java.lang.Object object)
|
boolean |
equals(java.lang.Object o)
Overridden to specify when two Petri net places are considered to be equal. |
int |
getNumber()
Returns the number which is associated to this place. |
int |
getNumberOfTokens()
Gets the number of tokens held by this place. |
int |
getNumberOfTokens(java.util.Date timestamp)
Gets the number of tokens that are available at the given timestamp at that place. |
Token |
getRandomAvailableToken()
Gets one of the tokens from this place. |
Token |
getRandomAvailableToken(java.util.Date timestamp)
Gets one of the tokens from this place that is available at the given timestamp. |
int |
hashCode()
Overridden to produce the same hash code for equal objects. |
boolean |
hasIdentifier(java.lang.String id)
Determines whether this place has the given identifier associated. |
void |
removeAllTokens()
Removes all tokens held by this place. |
Token |
removeToken()
Removes one of the tokens held by this place. |
Token |
removeToken(Token to)
Removes the specified token from this place. |
void |
setNumber(int n)
Assigns a number to this place. |
Methods inherited from class org.processmining.framework.models.ModelGraphVertex |
---|
getIdentifier, getIncidentEdges, getInEdgesIterator, getNeighbors, getOutEdgesIterator, getPredecessors, getSuccessors, getValue, getVerticesOnlyPredecessor, getVerticesOnlySuccessor, getVerticesPredecessorAndSuccessor, setIdentifier, setValue, toString |
Methods inherited from class att.grappa.Node |
---|
addEdge, attributeType, edgeElements, findInEdgeByKey, findOutEdgeByKey, getCenterPoint, getInEdges, getOutEdges, getType, inDegree, inEdgeElements, isNode, outDegree, outEdgeElements, printNode, removeEdge |
Methods inherited from class att.grappa.Element |
---|
addTag, attrNotOfInterest, attrOfInterest, bdfs, buildShape, canonString, canonValue, clearBBox, delete, getAttribute, getAttributePairs, getAttributeValue, getDefaultAttribute, getDefaultAttribute, getGraph, getGrappaNexus, getId, getIdKey, getLocalAttribute, getLocalAttributeKeys, getLocalAttributePairs, getName, getSubgraph, getThisAttribute, getThisAttributeValue, hasAttributeForKey, hasDefaultTag, hasDefaultTags, hasLocalTag, hasLocalTags, hasTag, hasTags, isEdge, isOfInterest, isSubgraph, listAttrsOfInterest, printElement, removeTag, removeTags, setAttribute, setAttribute, setDefaultAttribute, setDefaultAttribute, setDefaultAttribute, setDefaultAttribute, setIdKey, setSubgraph, setUserAttributeType, typeString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Place(java.lang.String identifier, PetriNet net)
identifier
- the name of the this placenet
- the PetriNet this place belongs toMethod Detail |
---|
public Token addToken(Token to)
to
- the token that should be added
public Token removeToken(Token to)
to
- the token that should be removed
null
otherwisepublic void removeAllTokens()
public Token removeToken()
null
otherwisepublic int getNumberOfTokens()
getNumberOfTokens(Date timestamp)
instead.
public int getNumberOfTokens(java.util.Date timestamp)
getNumberOfTokens()
instead.
timestamp
- the time at which the tokens must be available
public Token getRandomAvailableToken(java.util.Date timestamp)
getRandomAvailableToken()
instead.
timestamp
- the time at which the token must be available
null
otherwisepublic Token getRandomAvailableToken()
getRandomAvailableToken(Date timestamp)
instead.
null
otherwisepublic boolean hasIdentifier(java.lang.String id)
id
- the name to compare with
true
if this place has the same name as the given
string, false
otherwisepublic void setNumber(int n)
Since the identifier of a place is not necessarily unique (i.e.,
two places can have the same name) this method can be used to
assign unique numbers to the places of a Petri net, if needed.
getNumber()
can be used to retrieve the number.
n
- the number to be assignedpublic int getNumber()
Since the identifier of a place is not necessarily unique (i.e.,
two places can have the same name) this method can be used to
retrieve unique numbers from the places of a Petri net, if needed.
However, they are not associated automatically but must have been set
using the setNumber(int i)
method before.
public int compareTo(java.lang.Object object)
compareTo
in interface java.lang.Comparable
object
- Object
public boolean equals(java.lang.Object o)
equals
in class ModelGraphVertex
o
- the Place
to be compared with
true
if the identifiers are the same,
false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone()
PetriNet.clone()
method will update the
refernce correspondingly.
clone
in class att.grappa.Node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |