Mercurial > hg > Database > Alice
comparison src/main/java/alice/codesegment/CodeSegment.java @ 345:8f71c3e6f11d
Change directory structure Maven standard
author | sugi |
---|---|
date | Wed, 16 Apr 2014 18:26:07 +0900 |
parents | |
children | 4515fe620e3a |
comparison
equal
deleted
inserted
replaced
344:9f97ec18f8c5 | 345:8f71c3e6f11d |
---|---|
1 package alice.codesegment; | |
2 | |
3 import java.util.ArrayList; | |
4 | |
5 import alice.codesegment.InputDataSegment; | |
6 import alice.datasegment.Receiver; | |
7 | |
8 public abstract class CodeSegment implements Runnable { | |
9 | |
10 public InputDataSegment ids = new InputDataSegment(this); | |
11 public OutputDataSegment ods = new OutputDataSegment(); | |
12 public ArrayList<Receiver> list = new ArrayList<Receiver>(); | |
13 | |
14 public void execute() { | |
15 ids.receive(); | |
16 } | |
17 | |
18 public void recycle(){ | |
19 ids.init(); | |
20 ids.setCounter(list.size()); | |
21 for (Receiver receiver : list) { | |
22 ids.recommand(receiver); | |
23 } | |
24 } | |
25 | |
26 } |