protected void defaultRebuild( TIndexedCollection<DAGNode> nodes, boolean iterateNodes, TIndexedCollection<DAGEdge> edges, boolean iterateEdges) { if (iterateNodes) { DAGNode[] nodeArray = nodes.toArray(new DAGNode[nodes.size()]); for (DAGNode node : nodeArray) { if (supportsNode(node)) addNode(node); } } if (iterateEdges) { DAGEdge[] edgeArray = edges.toArray(new DAGEdge[edges.size()]); for (DAGEdge edge : edgeArray) { if (supportsEdge(edge)) addEdge(edge); } } }
@Override public boolean initialisationComplete( TIndexedCollection<DAGNode> nodes, TIndexedCollection<DAGEdge> edges, boolean forceRebuild) { if (taggedNodes_ == null) { taggedNodes_ = MultiMap.createSortedSetMultiMap(); TIntObjectIterator<DAGNode> iter = nodes.iterator(); for (int i = nodes.size(); i-- > 0; ) { iter.advance(); DAGNode n = iter.value(); String[] props = n.getProperties(); for (String prop : props) { if (prop.startsWith(TAG_PREFIX)) { taggedNodes_.put(prop, n); } } } } return super.initialisationComplete(nodes, edges, forceRebuild); }