Révision 6 petri/src/arcElement/ArcEntering.java

Voir les différences:

ArcEntering.java
5 5
public class ArcEntering extends Arc{
6 6
	
7 7
	private int value;
8

  
8
	/**
9
	 * @param the place link to ArcEntering and the value of this Arc
10
	 * Constructor for ArcEntering
11
	 *
12
	 */
9 13
	public ArcEntering(Place place, int value) {
10 14
		super(place);
11 15

  
12 16
		this.value=value;
13 17
	}
14
	
18
	/**
19
	 * Do the transition for the ArcEntering (add to the place value token)
20
	 *
21
	 */
15 22
	public void doTransition() {
16 23
		this.getPlace().changeToken(this.value);
17 24
	}
18
	
25
	/**
26
	 * Check if the ArcEntering is active (always true)
27
	 *@return true
28
	 */
19 29
	public boolean isActive() {
20 30
		return true;
21 31
	}
22
	
32
	/**
33
	 * Check if the ArcEntering is Pullable (always true)
34
	 *@return true
35
	 */
23 36
	public boolean isPullable() {
24 37
		return true;
25 38
	}
39
	/**
40
	 * @return a string that describe the ArcEntering
41
	 *
42
	 */
26 43
	public String toString() {
27 44
		return "ArcEntering value:"+value+", "+this.getPlace();
28 45
	}

Formats disponibles : Unified diff