Mercurial > hg > Members > tatsuki > Alice
view src/alice/test/codesegment/remote/RemoteIncrement.java @ 58:ebdcab7b9b04
add comment
author | one |
---|---|
date | Wed, 08 Feb 2012 17:06:39 +0900 |
parents | ca079a730d0b |
children | b5daccf36104 |
line wrap: on
line source
package alice.test.codesegment.remote; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class RemoteIncrement extends CodeSegment { public Receiver num = ids.create(CommandType.TAKE); /** * Increment DataSegment value up to 10 */ @Override public void run() { int num = this.num.asInteger(); System.out.println("[CodeSegment] " + num++); if (num == 10) System.exit(0); RemoteIncrement cs = new RemoteIncrement(); cs.num.setKey("remote", "num"); ods.put("local", "num", num); } }