view paper/source/TestCodeSegment.java @ 189:1369f653e34e default tip

fix
author Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
date Thu, 01 Mar 2018 15:04:46 +0900
parents d57aa814a69a
children
line wrap: on
line source

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);
    }
}