I have a java.util.HashMap object that I want to convert generally into a MatLab datatype, perhaps the new containers.Map type.
Ideally I could do:
it = javaHashMapObj.keySet.iterator;
while it.hasNext
jkey = it.next;
someMatlabObj(jkey) = javaHashMapObj.get(jkey);
end
Among other potential problems (please point out, resolve if they jump out at you!), there is the issue that if the Java HashMap is keyed with integers, it.next
will nevertheless return MatLab double objects, which will then not work as keys into the HashMap with javaHashMapObj.get
.
Can someone suggest a way to resolve this? Extend the Java object to give me the MatLab int32 for the keys?