Révision 6 petri/src/arcElement/ArcZero.java
ArcZero.java | ||
---|---|---|
7 | 7 |
|
8 | 8 |
|
9 | 9 |
public class ArcZero extends ArcOutering { |
10 |
|
|
10 |
/** |
|
11 |
* @param the place link to ArcZero and the value of this Arc |
|
12 |
* Constructor for ArcZero |
|
13 |
* |
|
14 |
*/ |
|
11 | 15 |
public ArcZero(Place place, int value) { |
12 | 16 |
super(place, value); |
13 | 17 |
} |
14 |
|
|
18 |
/** |
|
19 |
* Do the transition for the ArcZero (do nothing) |
|
20 |
* |
|
21 |
*/ |
|
15 | 22 |
public void doTransition() { |
16 | 23 |
} |
24 |
/** |
|
25 |
* Check if the place is active |
|
26 |
*@return true if place token at 0 |
|
27 |
*/ |
|
17 | 28 |
public boolean isActive() { |
18 | 29 |
return (this.getPlace().getToken()==0); |
19 | 30 |
} |
31 |
/** |
|
32 |
* Check if the place is pullable |
|
33 |
*@return true if place token at 0 |
|
34 |
*/ |
|
20 | 35 |
public boolean isPullable() { |
21 | 36 |
return this.isActive(); |
22 | 37 |
} |
38 |
/** |
|
39 |
* @return a string that describe the ArcZero |
|
40 |
* |
|
41 |
*/ |
|
23 | 42 |
public String toString() { |
24 | 43 |
return "ArcZero, "+this.getPlace(); |
25 | 44 |
} |
Formats disponibles : Unified diff