Package element
Class Place
- java.lang.Object
-
- element.Place
-
public class Place extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Place.UndefinedToken
exception to handle negative value for token
-
Constructor Summary
Constructors Constructor Description Place(int token)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeToken(int i)
boolean
equals(java.lang.Object o)
int
getToken()
boolean
isEmpty()
check if the place is not emptyjava.lang.String
toString()
-
-
-
Constructor Detail
-
Place
public Place(int token) throws Place.UndefinedToken
- Throws:
Place.UndefinedToken
-
-
Method Detail
-
getToken
public int getToken()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of the place
-
isEmpty
public boolean isEmpty()
check if the place is not empty
-
changeToken
public void changeToken(int i)
- Parameters:
int
- value that the place has to add to its token value
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
- Parameters:
Object
- to compare to the place the goal of this method is to check if two places are the same object (same identityHashCode)
-
-