Révision 4 petri/src/element/Transition.java
Transition.java | ||
---|---|---|
3 | 3 |
import java.util.ArrayList; |
4 | 4 |
import java.util.List; |
5 | 5 |
|
6 |
import arc.Arc; |
|
7 |
import arc.ArcEntering; |
|
8 |
import arc.ArcOutering; |
|
6 |
import arcElement.Arc; |
|
9 | 7 |
|
8 |
|
|
10 | 9 |
public class Transition { |
11 | 10 |
|
12 | 11 |
|
... | ... | |
46 | 45 |
public List<Arc> getArcList(){ |
47 | 46 |
return this.arcList; |
48 | 47 |
} |
49 |
public static void main(String[] args) { |
|
50 |
System.out.println("TEST METHODS TRANSITION"); |
|
51 |
|
|
52 |
Transition t1=new Transition(); |
|
53 |
t1.arcList.add(new ArcOutering(new Place(4), 2)); |
|
54 |
t1.arcList.add(new ArcEntering(new Place(4), 1)); |
|
55 | 48 |
|
56 |
Transition t2=new Transition(); |
|
57 |
t2.arcList.add(new ArcOutering(new Place(2), 3)); |
|
58 |
t2.arcList.add(new ArcEntering(new Place(2), 3)); |
|
59 |
|
|
60 |
System.out.println(" => method isPullable()"); |
|
61 | 49 |
|
62 |
System.out.println(t1); |
|
63 |
System.out.println("true : "+t1.isPullable()); |
|
64 |
System.out.println(t2); |
|
65 |
System.out.println("false : "+t2.isPullable()); |
|
66 |
|
|
67 |
System.out.println(" => method doTranstion()"); |
|
68 |
System.out.println("before : "+t1); |
|
69 |
t1.doTransition(); |
|
70 |
System.out.println("after : "+t1); |
|
71 |
|
|
72 |
|
|
73 |
} |
|
74 | 50 |
} |
Formats disponibles : Unified diff