Mercurial > hg > Members > tatsuki > Alice
view src/alice/datasegment/DataSegmentReceiver.java @ 18:72dd27d952b0
change InputDataSegment API
author | kazz <kazz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 15 Jan 2012 16:03:11 +0900 |
parents | 91057e15065f |
children | e7867328a2fb |
line wrap: on
line source
package alice.datasegment; import org.msgpack.type.Value; import alice.codesegment.InputDataSegment; public class DataSegmentReceiver { public InputDataSegment ids; public int index; public Value val; public CommandType type; public DataSegmentReceiver(InputDataSegment ids, CommandType type) { this.ids = ids; this.type = type; } public void setKey(String managerKey, String key) { setKey(managerKey, key, 0); } public void setKey(String managerKey, String key, int index) { switch (type) { case PEEK: ids.peek(this, managerKey, key, index); break; case TAKE: ids.take(this, managerKey, key, index); break; } } }