Statistiques
| Révision:

fr_b02 / petri / src / arcElement / ArcZero.java @ 6

Historique | Voir | Annoter | Télécharger (840 octets)

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