Returns in a {@link ListHolder} all the T elements that are present in the
current node and its ancestors, up to the root node.
962007
public SimpleListHolder<T> getFlatUp() {
        if (flatUp == null) {
            flatUp = newSimpleListHolder(up_to_root, getSortProperty());
        }
        return flatUp;
    }
1261967
public List<T> getRoots() {
    List<T> roots = new ArrayList<>();
    for (DirectedAcyclicGraphNode<T> root : mRoots) {
      roots.add(root.getPayload());
    }
    return roots;
  }
374741
public List<Index<SecondaryTable<T>>> getAllIndex()
   {
      List<Index<SecondaryTable<T>>> list = new ArrayList<Index<SecondaryTable<T>>>();
      List<Node> nodeList = childNode.get("index");
      for(Node node: nodeList)
      {
         Index<SecondaryTable<T>>  type = new IndexImpl<SecondaryTable<T>>(this, "index", childNode, node);
         list.add(type);
      }
      return list;
   }
1053233
public SimpleListHolder<T> getUniqueFlatUp() {
        if (uniqueUp == null) {
            uniqueUp = newUniqueSimpleListHolder(up_to_root, getSortProperty());
        }
        return uniqueUp;
    }
90457
def _get_ancestors(self, current=None):
        
        if not current:
            current = []
        current.insert(0, self)
        if self.is_root:
            if current:
                return current
        else:
            return self.parent._get_ancestors(current)
351287
public List<T> pollAll() {
    List<T> retList = new ArrayList<T>(size);
    pollAllToList(retList);
    return retList;
  }
1330897
public SimpleListHolder<T> except(String... namesToExclude) {
        String key = "current" + getCacheKey(namesToExclude);
        SimpleListHolder<T> result = cache.get(key);
        if (result == null) {
            result = new SimpleListHolder<T>(getIterable(), asNameNotEqualsToPredicates(namesToExclude), getSortProperty());
            cache.put(key, result);
        }
        return result;
    }
129275
def __descendants(self):
        
        return itertools.chain(self.contents,
                               *[c.descendants for c in self.children])
832967
public ListProperty<T> elementsProperty() {
		if (this.elements == null) {
			this.elements = new SimpleListProperty<>(this,
					MathFXAttributeNames.ELEMENTS, new InternalObservableList<>());
		}
		return this.elements;
	}
514142
@Nonnull
  public ExpressionTreeElement getRoot() {
    if (last.isEmptySlot()) {
      return this.last;
    } else {
      ExpressionTreeElement element = last;
      while (!Thread.currentThread().isInterrupted()) {
        final ExpressionTreeElement next = element.getParent();
        if (next == null) {
          return element;
        } else {
          element = next;
        }
      }
    }
    return ExpressionTreeElement.EMPTY_SLOT;
  }
520989
public SimpleListHolder<T> getUniqueFlatFull() {
        if (uniqueFull == null) {
            uniqueFull = newUniqueSimpleListHolder(all, getSortProperty());
        }
        return uniqueFull;
    }
418136
private TreeNode getParentTreeNode(TreeNode child) {
        TreeNode parentTreeNode = parentIndex.get(child);

        if (parentTreeNode == null)
            return null;

        // Makes sure the parent node is still present in the tree
        else if (contains(parentTreeNode.getQueryNode()))
            return parentTreeNode;
        else
            throw new RuntimeException("Internal error: points to a parent that is not (anymore) in the tree");
    }
1233378
public Node lastChild() {

		if (currentNode == null)
			return null;

		Node node = getLastChild(currentNode);

		if (node != null)
			currentNode = node;

		return node;
	}
1311800
public T remove() {
        final Node<T> previous = iterator.currentNode.previous;
        final T element = remove(iterator.currentNode);
        iterator.currentNode = previous;
        return element;
    }
474463
private Vector get_hierarchy() {
	synchronized (this) {
	    final Vector h = new Vector();
	    final Iterator it = elements.iterator();
	    while (it.hasNext()) {
		final GroupElement e = (GroupElement) it.next();
		if (e instanceof GroupDeviceElement) {
		    h.add(e);
		} else {
		    h.add(((Group) e).get_hierarchy());
		}
	    }
	    return h;
	}
    }
201327
@Override
	public Set<T> getAllChildNodes() {

		Set<T> allChildNodes = new HashSet();

		List<T> childNodes = treeGetChildren();

		for (final T child : childNodes) {

			allChildNodes.add(child);

			if (child instanceof LinkedTreeNode) {

				final LinkedTreeNode treeNode = (LinkedTreeNode)child;
				allChildNodes.addAll(treeNode.getAllChildNodes());
			}
		}

		return allChildNodes;
	}
925504
private Set<DagNode<T>> getAncestorNodes(Set<DagNode<T>> dagNodes) {
    Set<DagNode<T>> ancestorNodes = new HashSet<>();
    for (DagNode<T> dagNode : dagNodes) {
      LinkedList<DagNode<T>> nodesToExpand = Lists.newLinkedList(this.getParents(dagNode));
      while (!nodesToExpand.isEmpty()) {
        DagNode<T> nextNode = nodesToExpand.poll();
        ancestorNodes.add(nextNode);
        nodesToExpand.addAll(this.getParents(nextNode));
      }
    }
    return ancestorNodes;
  }