}
public void mergeSubState(TreeRowKey rowKey, TreeState subState) {
Iterator<TreeRowKey> iter = subState.expandedNodes.iterator();
while (iter != null && iter.hasNext()) {
TreeRowKey key = iter.next().getSubKey(1);
if (key.depth() > 0) {
expandedNodes.add(new ListRowKey((ListRowKey)rowKey, (ListRowKey)key));
} else if (!expandedNodes.contains(rowKey)) {
expandedNodes.add(rowKey);
}
}
Iterator<Entry<TreeRowKey, NodeState>> sItr = subState.queuedNodeStates.entrySet().iterator();
while (sItr.hasNext()) {
Entry<TreeRowKey, NodeState> entry = sItr.next();
TreeRowKey key = entry.getKey().getSubKey(1);
TreeRowKey newKey;
if (key.depth() > 0) {
newKey = new ListRowKey((ListRowKey)rowKey, (ListRowKey)key);
} else {
newKey = rowKey;