Révision 4 petri/src/arcElement/ArcZero.java
ArcZero.java | ||
---|---|---|
1 |
package arc; |
|
1 |
package arcElement;
|
|
2 | 2 |
|
3 |
|
|
4 |
|
|
3 | 5 |
import element.Place; |
4 | 6 |
|
7 |
|
|
8 |
|
|
5 | 9 |
public class ArcZero extends ArcOutering { |
6 | 10 |
|
7 | 11 |
public ArcZero(Place place, int value) { |
8 | 12 |
super(place, value); |
9 |
// TODO Auto-generated constructor stub |
|
10 | 13 |
} |
11 | 14 |
|
12 | 15 |
public void doTransition() { |
... | ... | |
20 | 23 |
public String toString() { |
21 | 24 |
return "ArcZero, "+this.getPlace(); |
22 | 25 |
} |
23 |
public static void main(String[] args) { |
|
24 |
System.out.println("TEST METHODS ARCZERO"); |
|
25 |
|
|
26 |
System.out.println(" => method isActive()"); |
|
27 |
Place emptyPlace = new Place(0); |
|
28 |
ArcZero arcc1 = new ArcZero(emptyPlace,2); |
|
29 |
Place place3 = new Place(3); |
|
30 |
ArcZero arcc2 = new ArcZero(place3,2); |
|
31 |
System.out.println(arcc1); |
|
32 |
System.out.println("true : "+arcc1.isActive()); |
|
33 |
System.out.println(arcc2); |
|
34 |
System.out.println("false : "+arcc2.isActive()); |
|
35 | 26 |
|
36 |
|
|
37 |
System.out.println(" => method isPullable()"); |
|
38 |
System.out.println(arcc1); |
|
39 |
System.out.println("false : "+arcc1.isPullable()); |
|
40 |
System.out.println(arcc2); |
|
41 |
System.out.println("true : "+arcc2.isPullable()); |
|
42 | 27 |
|
43 |
System.out.println(" => method doTranstion()"); |
|
44 |
System.out.println("before : "+arcc2); |
|
45 |
arcc2.doTransition(); |
|
46 |
System.out.println("after : "+arcc2); |
|
47 |
|
|
48 |
} |
|
49 |
|
|
50 | 28 |
} |
Formats disponibles : Unified diff