comparison src/alice/codesegment/ReceiveLocalData.java @ 217:b5c642ba998e working

change as** method and remove "local" key in TEST
author sugi
date Wed, 27 Mar 2013 20:02:38 +0900
parents 21bd8af1cf26
children
comparison
equal deleted inserted replaced
216:21bd8af1cf26 217:b5c642ba998e
3 import java.io.IOException; 3 import java.io.IOException;
4 4
5 import org.msgpack.type.ArrayValue; 5 import org.msgpack.type.ArrayValue;
6 import org.msgpack.type.Value; 6 import org.msgpack.type.Value;
7 7
8 import alice.datasegment.Receiver;
9 import alice.datasegment.ReceiverData; 8 import alice.datasegment.ReceiverData;
10 9
11 public class ReceiveLocalData implements ReceiverData { 10 public class ReceiveLocalData implements ReceiverData {
12 private Object obj; 11 private Object obj;
13 12
14 public ReceiveLocalData(Object obj2) { 13 public ReceiveLocalData(Object obj2) {
15 this.obj = obj2; 14 this.obj = obj2;
16 } 15 }
17 16
18 public String asString(Receiver receiver) { 17 public String asString() {
19 return (String) obj; 18 return (String) obj;
20 } 19 }
21 20
22 public int asInteger(Receiver receiver) { 21 public int asInteger() {
23 return (Integer) obj; 22 return (Integer) obj;
24 } 23 }
25 24
26 public Float asFloat(Receiver receiver) { 25 public Float asFloat() {
27 return (Float) obj; 26 return (Float) obj;
28 } 27 }
29 28
30 public ArrayValue asArray(Receiver receiver){ 29 public ArrayValue asArray(){
31 return (ArrayValue) obj; 30 return (ArrayValue) obj;
32 } 31 }
33 32
34 @SuppressWarnings("unchecked") 33 @SuppressWarnings("unchecked")
35 public <T> T asClass(Class<T> clazz) { 34 public <T> T asClass(Class<T> clazz) {