Early version of RMI system for Java part; supports primitives, one-dimensional array...
[iot2.git] / iotjava / iotrmi / IoTRMITypes.java
index a0c682f6eef5be5907bd173d2353a31be4ddb8be..c8ebcf3ced294ec1a00a5cab9079c500253c2739 100644 (file)
@@ -40,7 +40,7 @@ public class IoTRMITypes {
                "void"                  // 0 byte
        };
 
-       
+
        /**
         * Primitive data types in C++ to map the primitives list
         */
@@ -137,4 +137,14 @@ public class IoTRMITypes {
                        map.put(arrKey[i], arrVal[i]);
                }
        }
+
+       // Inserting array members into a Map object
+       // that maps arrKey to arrVal objects
+       public static void arraysToMap(Map<Object,Object> map, Object[] arrKey, Object[] arrVal) {
+
+               for(int i = 0; i < arrKey.length; i++) {
+
+                       map.put(arrKey[i], arrVal[i]);
+               }
+       }
 }