view src/main/java/alice/test/topology/aquarium/TakePnum.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 source

package alice.test.topology.aquarium;

import alice.codesegment.CodeSegment;
import alice.datasegment.CommandType;
import alice.datasegment.Receiver;

public class TakePnum extends CodeSegment {
	// this CodeSegment has bug
	
	private Receiver pnum = ids.create(CommandType.TAKE);
	private Receiver mynum;
	
	public TakePnum(Receiver data){
		this.pnum.setKey("parent", "num");
		this.mynum = data;
	}

	@Override
	public void run() {
		ods.update("parent", "num", 
				this.pnum.asInteger()+this.mynum.asInteger());
	}

}