Mercurial > hg > Database > Alice
diff src/main/java/alice/test/topology/aquarium/TakeMynum.java @ 345:8f71c3e6f11d
Change directory structure Maven standard
author | sugi |
---|---|
date | Wed, 16 Apr 2014 18:26:07 +0900 |
parents | |
children | aefbe41fcf12 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/alice/test/topology/aquarium/TakeMynum.java Wed Apr 16 18:26:07 2014 +0900 @@ -0,0 +1,27 @@ +package alice.test.topology.aquarium; + +import alice.codesegment.CodeSegment; +import alice.datasegment.CommandType; +import alice.datasegment.Receiver; + +public class TakeMynum extends CodeSegment { + + private Receiver mynum = ids.create(CommandType.TAKE); + + public TakeMynum(){ + this.mynum.setKey("num"); + } + + public TakeMynum(int index){ + this.mynum.setKey("num", index); + } + + @Override + public void run() { + new TakePnum(this.mynum); + ods.put("num", 0); + new TakeMynum(this.mynum.index+1); + } + +} +