if (elem instanceof INode) {
INode<K, V> in = (INode<K, V>) elem;
narr [i] = in.copyToGen(ngen, ct);
- } else if (elem instanceof BasicNode) {
+ } else if (elem != null) {
narr [i] = elem;
}
i += 1;
m = /* READ */ READ();
continue;
}
- } else if (prev instanceof MainNode) {
+ } else if (prev != null) {
// Assume that you've read the root from the generation
// G.
// Assume that the snapshot algorithm is correct.
} else if (m instanceof LNode) {
// 5) an l-node
Option<V> tmp = ((LNode<K, V>) m).get (k);
- return (tmp instanceof Option) ? ((Option<V>) tmp) : null;
+ return (tmp != null) ? ((Option<V>) tmp) : null;
}
throw new RuntimeException ("Should not happen");