protected Multimap<Integer, OntologyTerm> getChildren(OntologyTerm term, int currentDepth, int maxDepth) { if (currentDepth > maxDepth) { return HashMultimap.create(); } Multimap<Integer,OntologyTerm> terms = HashMultimap.create(); terms.put(currentDepth, term); for (OntologyTerm child : term.getChildren()) { terms.putAll(getChildren(child, currentDepth+1, maxDepth)); } return terms; }
protected Multimap<Integer, OntologyTerm> getChildren(OntologyTerm term, int currentDepth, int maxDepth) { if (currentDepth > maxDepth) { return HashMultimap.create(); } Multimap<Integer,OntologyTerm> terms = HashMultimap.create(); terms.put(currentDepth, term); for (OntologyTerm child : term.getChildren()) { terms.putAll(getChildren(child, currentDepth+1, maxDepth)); } return terms; }
protected Multimap<Integer, OntologyTerm> getChildren(OntologyTerm term, int currentDepth, int maxDepth) { if (currentDepth > maxDepth) { return HashMultimap.create(); } Multimap<Integer,OntologyTerm> terms = HashMultimap.create(); terms.put(currentDepth, term); for (OntologyTerm child : term.getChildren()) { terms.putAll(getChildren(child, currentDepth+1, maxDepth)); } return terms; }