345
|
1 package alice.test.topology.aquarium;
|
|
2
|
|
3 import alice.codesegment.CodeSegment;
|
|
4 import alice.datasegment.CommandType;
|
|
5 import alice.datasegment.Receiver;
|
|
6
|
|
7 public class TakePnum extends CodeSegment {
|
419
|
8 // this CodeSegment has bug
|
|
9
|
|
10 private Receiver pnum = ids.create(CommandType.TAKE);
|
|
11 private Receiver mynum;
|
345
|
12
|
419
|
13 public TakePnum(Receiver data){
|
|
14 this.pnum.setKey("parent", "num");
|
|
15 this.mynum = data;
|
|
16 }
|
|
17
|
|
18 @Override
|
|
19 public void run() {
|
467
|
20 ods.update("parent", "num",
|
419
|
21 this.pnum.asInteger()+this.mynum.asInteger());
|
|
22 }
|
345
|
23
|
|
24 }
|