Mercurial > hg > Database > Alice
comparison src/main/java/alice/test/topology/aquarium/TakeMynum.java @ 419:aefbe41fcf12 dispose
change tab to space
author | sugi |
---|---|
date | Tue, 15 Jul 2014 16:00:22 +0900 |
parents | 8f71c3e6f11d |
children | 15eeb439830c |
comparison
equal
deleted
inserted
replaced
418:a269a019f5f8 | 419:aefbe41fcf12 |
---|---|
3 import alice.codesegment.CodeSegment; | 3 import alice.codesegment.CodeSegment; |
4 import alice.datasegment.CommandType; | 4 import alice.datasegment.CommandType; |
5 import alice.datasegment.Receiver; | 5 import alice.datasegment.Receiver; |
6 | 6 |
7 public class TakeMynum extends CodeSegment { | 7 public class TakeMynum extends CodeSegment { |
8 | |
9 private Receiver mynum = ids.create(CommandType.TAKE); | |
10 | |
11 public TakeMynum(){ | |
12 this.mynum.setKey("num"); | |
13 } | |
14 | |
15 public TakeMynum(int index){ | |
16 this.mynum.setKey("num", index); | |
17 } | |
18 | 8 |
19 @Override | 9 private Receiver mynum = ids.create(CommandType.TAKE); |
20 public void run() { | 10 |
21 new TakePnum(this.mynum); | 11 public TakeMynum(){ |
22 ods.put("num", 0); | 12 this.mynum.setKey("num"); |
23 new TakeMynum(this.mynum.index+1); | 13 } |
24 } | 14 |
15 public TakeMynum(int index){ | |
16 this.mynum.setKey("num", index); | |
17 } | |
18 | |
19 @Override | |
20 public void run() { | |
21 new TakePnum(this.mynum); | |
22 ods.put("num", 0); | |
23 new TakeMynum(this.mynum.index+1); | |
24 } | |
25 | 25 |
26 } | 26 } |
27 | 27 |