diff src/alice/datasegment/Receiver.java @ 88:33a19ca88e43 working

Singleton is removed .
author sugi
date Mon, 04 Jun 2012 16:08:53 +0900
parents ca42a2c8ac22
children b01fb5090e28
line wrap: on
line diff
--- a/src/alice/datasegment/Receiver.java	Sun Jun 03 18:56:24 2012 +0900
+++ b/src/alice/datasegment/Receiver.java	Mon Jun 04 16:08:53 2012 +0900
@@ -78,6 +78,13 @@
 		return 0;
 	}
 	
+	public Float asFloat() {
+		if (val.getType() == ValueType.FLOAT) {
+			return val.asFloatValue().getFloat();
+		}
+		return 0.0f;
+	}
+	
 	public <T> T asClass(Class<T> clazz) {
 		MessagePack msgpack = new MessagePack();
 		try {