view src/alice/codesegment/CodeSegment.java @ 314:f1f0638861ab

ping responce receivable
author sugi
date Fri, 06 Dec 2013 11:42:51 +0900
parents 4b99234c88d4
children 2f003d5703d5
line wrap: on
line source

package alice.codesegment;

import java.util.ArrayList;

import alice.codesegment.InputDataSegment;
import alice.datasegment.Receiver;

public abstract class CodeSegment implements Runnable {
	
	public InputDataSegment ids = new InputDataSegment(this);
	public OutputDataSegment ods = new OutputDataSegment();
	public ArrayList<Receiver> list = new ArrayList<Receiver>();
	
	public void execute() {
		ids.receive();
	}
	
	public void recycle(){
		ids.init();
		ids.setCounter(list.size());
		for (Receiver receiver : list) {
			ids.recommand(receiver);
		}
	}

}