423424425426427428429430431432433
if (leaves != null) leaves.add(v); } else { List children = getChildrenOf(v); s.addAll(children); } if (nodes != null) nodes.add(v); } }
115116117118119120121122123124125
v.setBranchLength(ew); v.setHeightToRoot(p.getHeightToRoot() + ew); v.setParent(p); } // Add this vertex's children to the stack. s.addAll(getChildrenOfNoSort(v)); } /* * STEP 2: LEAVES TO ROOT. */
571572573574575576577578579580581
public void findJoins(AbstractQueryImpl query){ Stack stack = new Stack(); stack.push(this); while(!stack.isEmpty()){ FromImpl currentJoin = (FromImpl) stack.pop(); stack.addAll(currentJoin.getJoins()); if (currentJoin.isJoin) { query.addJoin(currentJoin); } } }
584585586587588589590591592593594
List<org.eclipse.persistence.expressions.Expression> fetches = new ArrayList<org.eclipse.persistence.expressions.Expression>(); Stack stack = new Stack(); stack.push(this); while(!stack.isEmpty()){ FromImpl currentFetch = (FromImpl) stack.pop(); stack.addAll(currentFetch.getFetches()); if (currentFetch.isFetch) {//currentJoin.isLeaf){ fetches.add(currentFetch.getCurrentNode()); } } return fetches;
138139140141142143144145146147148
{ if (!target.isDirectory()) target.delete(); else { Stack s = new Stack(); s.addAll(Arrays.asList(target.listFiles())); while (true){ try { remove((File)s.pop()); }
199200201202203204205206207208209
protected List allDependencies() { LinkedList unpacked = new LinkedList(); Stack stack = new Stack(); stack.addAll(getDependencies()); while (!stack.isEmpty()) { XSD xsd = (XSD) stack.pop(); if (!equals(xsd) && !unpacked.contains(xsd)) {
206207208209210211212213214215216
while (!stack.isEmpty()) { XSD xsd = (XSD) stack.pop(); if (!equals(xsd) && !unpacked.contains(xsd)) { unpacked.addFirst(xsd); stack.addAll(xsd.getDependencies()); } } return unpacked; }
564565566567568569570571572573574
public void findJoins(AbstractQueryImpl query){ Stack stack = new Stack(); stack.push(this); while(!stack.isEmpty()){ FromImpl currentJoin = (FromImpl) stack.pop(); stack.addAll(currentJoin.getJoins()); if (currentJoin.isLeaf){ query.addJoin(currentJoin); } } }
577578579580581582583584585586587
List<org.eclipse.persistence.expressions.Expression> fetches = new ArrayList<org.eclipse.persistence.expressions.Expression>(); Stack stack = new Stack(); stack.push(this); while(!stack.isEmpty()){ FromImpl currentJoin = (FromImpl) stack.pop(); stack.addAll(currentJoin.getFetches()); if (currentJoin.isLeaf){ fetches.add(currentJoin.getCurrentNode()); } } return fetches;