Return all matching <em>sub</em>-trees.

@return all matching sub-trees
@throws NullPointerException if the given predicate is {@code null}
556885
public Stream<TreeMatchResult<V>> results() {
		return _tree.stream()
			.flatMap((Tree<V, ?> tree) -> _pattern.match(tree, _equals)
				.map(Stream::of)
				.orElseGet(Stream::empty));
	}
832771
public FoundNode[] filterInstanceToLeaves(Instance inst,
            SplitNode parent, int parentBranch, boolean updateSplitterCounts) {
        List<FoundNode> nodes = new LinkedList<FoundNode>();
        ((NewNode) this.treeRoot).filterInstanceToLeaves(inst, parent, parentBranch, nodes,
                updateSplitterCounts);
        return nodes.toArray(new FoundNode[nodes.size()]);
    }
735284
public java.util.Map<String, java.util.List<String>> getSubstitutions() {
        return substitutions;
    }
296309
@Pure
	public static <T> Collection<Class<? extends T>> getSubClasses(Class<T> className) {
		final Collection<Class<? extends T>> list = new ArrayList<>();
		getSubClasses(className, true, true, true, list);
		return list;
	}
971665
public static List<Object> getAllNodes(TreeModel treeModel)
    {
        List<Object> result = new ArrayList<Object>();
        getAllDescendants(treeModel, treeModel.getRoot(), result);
        result.add(0, treeModel.getRoot());
        return result;
    }
848423
def get_siblings(self):
        
        if self.parent:
            return get_result_class(self.__class__).objects.filter(
                parent=self.parent)
        return self.__class__.get_root_nodes()
784797
public Tree getNextSibling() {
		if (parent != null && key != null) {
			if (key instanceof Integer) {
				int idx = (int) key;
				if (parent.size() >= idx - 1) {
					return null;
				}
				return parent.get(idx + 1);
			}
			boolean found = false;
			for (Tree child : parent) {
				if (key.equals(child.key)) {
					found = true;
					continue;
				}
				if (found) {
					return child;
				}
			}
		}
		return null;
	}
788546
public Set<MessageDescriptor<? extends M>> getSubtypes() {
		if (subtypes != null) {
			return subtypes;
		}

		Set<MessageDescriptor<? extends M>> list = new HashSet<MessageDescriptor<? extends M>>();
		for (Provider<MessageDescriptor<? extends M>> provider : subtypeProviders) {
			MessageDescriptor<? extends M> subtype = provider.get();
			list.add(subtype);
		}

		Map<Enum<?>, MessageDescriptor<? extends M>> map = new HashMap<Enum<?>,
				MessageDescriptor<? extends M>>();
		for (MessageDescriptor<? extends M> subtype : list) {
			map.put(subtype.getDiscriminatorValue(), subtype);
		}

		subtypes = ImmutableCollections.set(list);
		subtypeMap = ImmutableCollections.map(map);
		return subtypes;
	}
870278
@Override
    public Stream<FedoraResource> getChildren(final Boolean recursive) {
        try {
            if (recursive) {
                return nodeToGoodChildren(node).flatMap(FedoraResourceImpl::getAllChildren);
            }
            return nodeToGoodChildren(node);
        } catch (final RepositoryException e) {
            throw new RepositoryRuntimeException(e);
        }
    }
1208003
private boolean isWithinSubtree(X500Name other) {
        if (this == other) {
            return true;
        }
        if (other == null) {
            return false;
        }
        if (other.names.length == 0) {
            return true;
        }
        if (this.names.length == 0) {
            return false;
        }
        if (names.length < other.names.length) {
            return false;
        }
        for (int i = 0; i < other.names.length; i++) {
            if (!names[i].equals(other.names[i])) {
                return false;
            }
        }
        return true;
    }
1238438
private static List<Tree<Node>> getNewTree(Tree<Node> inst){	
		delDefault(inst);
		List<Tree<Node>> newTreeList = new ArrayList<Tree<Node>>();
		List<Tree<Node>> children = new ArrayList<Tree<Node>>();
		if(!inst.isLeaf()&&!inst.getFirstChild().isLeaf()){
			boolean hasPu = false;
			Tree<Node> newInst=null;
			for(int i=0;i<inst.getFirstChild().children.size();i++){
				children.add(inst.getFirstChild().getChild(i));				
				String tag = inst.getFirstChild().getLabel().getTag();
				String flag0 = inst.getFirstChild().getChild(i).getLabel().getTag();
				String data0 = inst.getFirstChild().getChild(i).getLabel().getData();			
				if(flag0.equals("PU")&&
						(data0.equals("，")
						||data0.equals("；")
						||data0.equals("、")
						||data0.equals("。")
						||data0.equals("！")
						||data0.equals("？"))){
					hasPu = true;
					if(children.size()!=0)
						newInst = new Tree<Node>(new Node(tag,"",0),children);
					else
						newInst = new Tree<Node>(new Node(tag,"",0));
					
					newTreeList.add(newInst);
					children = new ArrayList<Tree<Node>>();
				}				
			}
			if(!hasPu)
				newTreeList.add(inst);
		}
		return newTreeList;
	}
128115
private static void getLeafNodes(
        TreeModel treeModel, Object node, Collection<Object> leafNodes)
    {
        if (node == null)
        {
            return;
        }
        int childCount = treeModel.getChildCount(node);
        if (childCount == 0)
        {
            leafNodes.add(node);
        }
        else
        {
            for (int i = 0; i < childCount; i++)
            {
                Object child = treeModel.getChild(node, i);
                getLeafNodes(treeModel, child, leafNodes);
            }
        }
    }
216801
@Nullable
  List<String> getAllTextParagraphs() {
    try {
      List<String> allParas = new ArrayList<>();
      if (xPCursor == null) {
        return null;
      }
      xPCursor.gotoStart(false);
      xPCursor.gotoStartOfParagraph(false);
      xPCursor.gotoEndOfParagraph(true);
      allParas.add(xPCursor.getString());
      while (xPCursor.gotoNextParagraph(false)) {
        xPCursor.gotoStartOfParagraph(false);
        xPCursor.gotoEndOfParagraph(true);
        allParas.add(xPCursor.getString());
      }
      return allParas;
    } catch (Throwable t) {
      MessageHandler.printException(t);     // all Exceptions thrown by UnoRuntime.queryInterface are caught
      return null;           // Return null as method failed
    }
  }
504497
public LeafNode<K, V> nextNode() {
		if (rightid == NULL_ID) {
			return null;
		}
		return (LeafNode<K, V>) tree.getNode(rightid);
	}
1327124
public List<Condition> getAndConditions() {
		if (null == subConditions) {
			return null;
		}
		List<Condition> ret = new ArrayList<Condition>();
		for (Condition subContion : subConditions) {
			if (AND.equals(subContion.joinType)) {
				ret.add(subContion);
			}
		}
		return ret;
	}
38724
public List<MappedSuperclass<EntityMappings<T>>> getAllMappedSuperclass()
   {
      List<MappedSuperclass<EntityMappings<T>>> list = new ArrayList<MappedSuperclass<EntityMappings<T>>>();
      List<Node> nodeList = childNode.get("mapped-superclass");
      for(Node node: nodeList)
      {
         MappedSuperclass<EntityMappings<T>>  type = new MappedSuperclassImpl<EntityMappings<T>>(this, "mapped-superclass", childNode, node);
         list.add(type);
      }
      return list;
   }
904194
public Set<InternalQName> getDeclaredSubtypes(final InternalQName nodeTypeName)
   {
      Set<InternalQName> resultSet = new HashSet<InternalQName>();
      for (Map.Entry<InternalQName, NodeTypeHolder> entry : nodeTypes.entrySet())
      {
         InternalQName[] declaredSupertypeNames = entry.getValue().nodeType.getDeclaredSupertypeNames();
         for (int i = 0; i < declaredSupertypeNames.length; i++)
         {
            if (nodeTypeName.equals(declaredSupertypeNames[i]))
               resultSet.add(entry.getKey());
         }
      }
      return resultSet;
   }