Statistiques
| Révision:

fr_b02 / petri / src / arcElement / ArcOutering.java @ 4

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

1 4 a19coudr
package arcElement;
2 2 a19coudr
3 3 a19coudr
import element.Place;
4
5 2 a19coudr
public class ArcOutering extends Arc{
6
7
        private int value;
8
9
        public ArcOutering(Place place, int value) {
10
                super(place);
11
                this.value=value;
12
        }
13
        public String toString() {
14
                return "ArcOutering value:"+value+", "+this.getPlace();
15
        }
16
17
        public void doTransition() {
18
                this.getPlace().changeToken(this.value*(-1));
19
        }
20
21
        public boolean isActive() {
22
                return true;
23
        }
24
25
        public boolean isPullable() {
26
                return (this.getPlace().getToken()>=value);
27
        }
28
29
30
31
}