Révision 7 petri/src/element/Transition.java

Voir les différences:

Transition.java
10 10
	
11 11
	
12 12
	private List<Arc> arcList;
13
	
13
	/**
14
	 * @return a string representation of a transition
15
	 */
14 16
	public String toString() {
15 17
		String res= " [";
16 18
		for(int i=0;arcList.size()>i;i++ ) {
......
24 26
		this.arcList=new ArrayList<Arc>();
25 27
	}
26 28
	
27

  
29
	/**
30
	 * check if the transition is pullable
31
	 * @return true if all its arcs are pullable
32
	 */
28 33
	public boolean isPullable() {
29 34
		int i=0;
30 35
		boolean res=true;
......
34 39
		}
35 40
		return res;
36 41
	}
37
	
42
	/**
43
	 * 
44
	 * do the transition 
45
	 * (all its arcs do the transition
46
	 */
38 47
	public void doTransition() {
39 48
		if (this.isPullable()==true) {
40 49
			for (int i=0; i<arcList.size();i++) {

Formats disponibles : Unified diff