view src/alice/test/codesegment/local/TestCodeSegment.java @ 190:a85ff8dc16c1 working

add Object data
author one
date Thu, 07 Mar 2013 21:27:00 +0900
parents 4475ba30238f
children a8b0d44bbe68
line wrap: on
line source

package alice.test.codesegment.local;

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

public class TestCodeSegment extends CodeSegment {
	
	static int count = 0;
	
	// create input datasegment arg1
	Receiver arg1 = ids.create(CommandType.PEEK);
	public TestCodeSegment(){
		arg1.setKey("key1");
	}
	public TestCodeSegment(int index){
		arg1.setKey("key1",index);
	}
	
	@Override
	public void run() {
		if(count > 1){
			System.out.println(System.currentTimeMillis() - StartCodeSegment.t);
			System.exit(1);
		}
		//System.out.println(arg1.obj);
		//System.out.println(arg1.val);
		
		//ods.update("key1",arg1.asInteger()+1);
		new TestCodeSegment();
		
		//new TestCodeSegment(arg1.index);
		
		count++;
		// DataSegment.get("local").update
		//ods.update("local", "key1", arg1.index);
		
	}

}