- java.lang.Object
-
- fr.inria.mochy.core.abstractClass.PlaceAbstract
-
- fr.inria.mochy.core.equalization.EquPlace
-
public class EquPlace extends PlaceAbstract
The EquPlace is a place which can contains multiple tokens
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToken()
add a token in the placevoid
addToken(Token token)
add a token to this placeint
getDistance()
get the length of this placeString
getName()
get the name of the placeInteger
getNumber()
get the number of the placeEquTransition
getPost()
get the next transition of the placeEquTransition
getPre()
get the previous transition of the placeToken
getReadyToken()
get the token at the end of this place or return null is there are noneArrayList<Token>
getTokens()
returns the current contents of the placeboolean
isMarked()
True if the place contains some tokenboolean
isStartPlace()
check if it place is the origin of the loopvoid
setEmpty()
empties the current placevoid
setPost(EquTransition t)
set the postset of current placevoid
setPre(EquTransition t)
set the next transition of the placeString
toString()
display information of the place in the console
-
-
-
Method Detail
-
getName
public String getName()
Description copied from class:PlaceAbstract
get the name of the place- Specified by:
getName
in classPlaceAbstract
-
getNumber
public Integer getNumber()
Description copied from class:PlaceAbstract
get the number of the place- Specified by:
getNumber
in classPlaceAbstract
-
getPre
public EquTransition getPre()
get the previous transition of the place
-
getPost
public EquTransition getPost()
get the next transition of the place
-
setPre
public void setPre(EquTransition t)
set the next transition of the place- Parameters:
t
- the EquTransition
-
setPost
public void setPost(EquTransition t)
set the postset of current place- Parameters:
t
- the EquTransition
-
addToken
public void addToken()
Description copied from class:PlaceAbstract
add a token in the place- Specified by:
addToken
in classPlaceAbstract
-
addToken
public void addToken(Token token)
add a token to this place
-
setEmpty
public void setEmpty()
empties the current place
-
getDistance
public int getDistance()
get the length of this place
-
isStartPlace
public boolean isStartPlace()
check if it place is the origin of the loop
-
getReadyToken
public Token getReadyToken()
get the token at the end of this place or return null is there are none
-
isMarked
public boolean isMarked()
True if the place contains some token- Returns:
-
-