# HG changeset patch # User sugi # Date 1376341562 -32400 # Node ID 41312b857f3445938ba210f50ab757f2bdf208cc # Parent b4690114a0cd8c3978b00a8096f808dc490833d4 replace ReceiveLocalData.java diff -r b4690114a0cd -r 41312b857f34 src/alice/codesegment/InputDataSegment.java --- a/src/alice/codesegment/InputDataSegment.java Tue Aug 13 06:02:55 2013 +0900 +++ b/src/alice/codesegment/InputDataSegment.java Tue Aug 13 06:06:02 2013 +0900 @@ -5,6 +5,7 @@ import alice.datasegment.Command; import alice.datasegment.CommandType; import alice.datasegment.DataSegment; +import alice.datasegment.ReceiveLocalData; import alice.datasegment.ReceiveRemoteData; import alice.datasegment.Receiver; diff -r b4690114a0cd -r 41312b857f34 src/alice/codesegment/ReceiveLocalData.java --- a/src/alice/codesegment/ReceiveLocalData.java Tue Aug 13 06:02:55 2013 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -package alice.codesegment; - -import java.io.IOException; - -import org.msgpack.type.ArrayValue; -import org.msgpack.type.Value; - -import alice.datasegment.ReceiverData; - -public class ReceiveLocalData implements ReceiverData { - private Object obj; - - public ReceiveLocalData(Object obj2) { - this.obj = obj2; - } - - public String asString() { - return (String) obj; - } - - public int asInteger() { - return (Integer) obj; - } - - public Float asFloat() { - return (Float) obj; - } - - public ArrayValue asArray(){ - return (ArrayValue) obj; - } - - @SuppressWarnings("unchecked") - public T asClass(Class clazz) { - return (T) obj; - - } - - @Override - public Value getVal() { - try { - return SingletonMessage.getInstance().unconvert(obj); - } catch (IOException e) { - e.printStackTrace(); - } - return null; - } - - @Override - public Object getObj() { - return obj; - } - -} diff -r b4690114a0cd -r 41312b857f34 src/alice/datasegment/ReceiveLocalData.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/alice/datasegment/ReceiveLocalData.java Tue Aug 13 06:06:02 2013 +0900 @@ -0,0 +1,55 @@ +package alice.datasegment; + +import java.io.IOException; + +import org.msgpack.type.ArrayValue; +import org.msgpack.type.Value; + +import alice.codesegment.SingletonMessage; +import alice.datasegment.ReceiverData; + +public class ReceiveLocalData implements ReceiverData { + private Object obj; + + public ReceiveLocalData(Object obj2) { + this.obj = obj2; + } + + public String asString() { + return (String) obj; + } + + public int asInteger() { + return (Integer) obj; + } + + public Float asFloat() { + return (Float) obj; + } + + public ArrayValue asArray(){ + return (ArrayValue) obj; + } + + @SuppressWarnings("unchecked") + public T asClass(Class clazz) { + return (T) obj; + + } + + @Override + public Value getVal() { + try { + return SingletonMessage.getInstance().unconvert(obj); + } catch (IOException e) { + e.printStackTrace(); + } + return null; + } + + @Override + public Object getObj() { + return obj; + } + +}