Mercurial > hg > Database > Alice
comparison src/main/java/alice/test/codesegment/local/TestCodeSegment.java @ 547:e91a574b69de dispose
remove index
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 18 Aug 2015 16:15:17 +0900 |
parents | 15eeb439830c |
children | b44a2bf16eb3 |
comparison
equal
deleted
inserted
replaced
546:15eeb439830c | 547:e91a574b69de |
---|---|
11 // create input datasegment arg1 | 11 // create input datasegment arg1 |
12 Receiver arg1 = ids.create(CommandType.PEEK);//peek用Receiverを生成 | 12 Receiver arg1 = ids.create(CommandType.PEEK);//peek用Receiverを生成 |
13 | 13 |
14 @Override | 14 @Override |
15 public void run() { | 15 public void run() { |
16 System.out.println("in TestCodeSegment"); | |
16 System.out.println("type = " + arg1.type); | 17 System.out.println("type = " + arg1.type); |
17 System.out.println("index = " + arg1.index); | 18 //System.out.println("index = " + arg1.index); |
18 System.out.println("data = " + arg1.getVal()); | 19 int num = arg1.asInteger(); |
20 System.out.println("data = " + num); | |
19 System.out.println(((Value)arg1.getVal()).getType());//←伝統。なくてもいい。 | 21 System.out.println(((Value)arg1.getVal()).getType());//←伝統。なくてもいい。 |
20 | 22 |
21 if (arg1.index == 10) { | 23 if (num++ == 10) { |
22 System.exit(0); | 24 System.exit(0); |
23 return; | 25 return; |
24 } | 26 } |
25 | 27 |
26 TestCodeSegment cs = new TestCodeSegment(); | 28 TestCodeSegment cs = new TestCodeSegment(); |
27 //cs.ids.setAliceDaemon(this); | 29 //cs.ids.setAliceDaemon(this); |
28 cs.arg1.setKey("key1", arg1.index, this);//Receiverに値をpeekしてくる | 30 cs.arg1.setKey("key1", this);//Receiverに値をpeekしてくる |
29 | 31 |
30 // DataSegment.get("local").update | 32 // DataSegment.get("local").update |
31 ods.update("local", "key1", "String data"); | 33 ods.update("local", "key1", num); |
32 } | 34 } |
33 | 35 |
34 } | 36 } |