Yeah, right before I got the reply, I figured it out. I can't believe that I didn't see it.
Now, this brings me to another issue....
I can't seem to cast from the iteration to my previous type. See below:
private enum xType
{
a,
b,
c,
d,
}
private static class zType
{
static xType x;
static long y;
}
private static Map testMap = new HashMap();
public static void main(String[] args) {
zType z = new zType();
zType w = new zType();
xType v;
long l;
String var = "hello";
z.y = 23;
z.x = xType.a;
testMap.put(var, trackDataType);
Set entries = testMap.entrySet();
Iterator it = entries.iterator();
if (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
w = (zType)entry; // It say illegal cast
v = z.x;
l = z.y;
}
}
Is there a way to make this work? It also says that I cannot cast from Map.Entry to zType. But, when I cast it (as shown), it says illegal cast.
Sorry to bother again, and thanks for the help.
B
