fr_b02 / petri / src / arcElement / ArcEntering.java @ 4
Historique | Voir | Annoter | Télécharger (498 octets)
1 |
package arcElement; |
---|---|
2 |
|
3 |
import element.Place; |
4 |
|
5 |
public class ArcEntering extends Arc{ |
6 |
|
7 |
private int value; |
8 |
|
9 |
public ArcEntering(Place place, int value) { |
10 |
super(place);
|
11 |
|
12 |
this.value=value;
|
13 |
} |
14 |
|
15 |
public void doTransition() { |
16 |
this.getPlace().changeToken(this.value); |
17 |
} |
18 |
|
19 |
public boolean isActive() { |
20 |
return true; |
21 |
} |
22 |
|
23 |
public boolean isPullable() { |
24 |
return true; |
25 |
} |
26 |
public String toString() { |
27 |
return "ArcEntering value:"+value+", "+this.getPlace(); |
28 |
} |
29 |
|
30 |
|
31 |
|
32 |
|
33 |
} |