Mercurial > hg > Papers > 2018 > nozomi-master
diff paper/source/TestCodeSegment.java @ 149:d57aa814a69a
add source, add chapter2
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 27 Jan 2018 19:16:38 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/paper/source/TestCodeSegment.java Sat Jan 27 19:16:38 2018 +0900 @@ -0,0 +1,19 @@ +public class TestCodeSegment extends CodeSegment { + private Receiver input1 = ids.create(CommandType.TAKE); + + public TestCodeSegment() { + input1.setKey("local", "cnt"); + } + + @Override + public void run() { + int count = input1.asInteger(); + System.out.println("data = " + count); + count++; + if (count == 10){ + System.exit(0); + } + new TestCodeSegment(); + ods.put("local", "cnt", count); + } +}