Mercurial > hg > Papers > 2015 > sugi-master
view paper/source/TestCodeSegment.java @ 4:e59c8e99a5c1
modify chapter4
author | sugi |
---|---|
date | Sun, 04 Jan 2015 04:43:51 +0900 |
parents | |
children | cefaf86da446 |
line wrap: on
line source
public class TestCodeSegment extends CodeSegment { private Receiver input1 = ids.create(CommandType.TAKE); public TestCodeSegment() { input1.setKey("local", "key1"); } @Override public void run() { int num = input1.asInteger(); System.out.println("data = " + num); if (num == 10) System.exit(0); new TestCodeSegment(); ods.update("local", "key1", ++num); } }