@Test public void testLowestCommonAncestor() { System.out.println("lowestCommonAncestor"); Concept result = instance.lowestCommonAncestor("A", "B"); assertEquals(a, result); result = instance.lowestCommonAncestor("E", "B"); assertEquals(instance.getRoot(), result); }
public Concept lowestCommonAncestor(String v, String w) { Concept vnode = getConcept(v); Concept wnode = getConcept(w); return lowestCommonAncestor(vnode, wnode); }
Taxonomy { public Concept lowestCommonAncestor(String v, String w) { Concept vnode = getConcept(v); Concept wnode = getConcept(w); return lowestCommonAncestor(vnode, wnode); } }
Taxonomy { public Concept lowestCommonAncestor(String v, String w) { Concept vnode = getConcept(v); Concept wnode = getConcept(w); return lowestCommonAncestor(vnode, wnode); } Taxonomy(String... rootConcept); }
Taxonomy { public Concept lowestCommonAncestor(String v, String w) { Concept vnode = getConcept(v); Concept wnode = getConcept(w); return lowestCommonAncestor(vnode, wnode); } Taxonomy(String... rootConcept); Concept getRoot(); Concept getConcept(String keyword); List<String> getConcepts(); Concept lowestCommonAncestor(String v, String w); Concept lowestCommonAncestor(Concept v, Concept w); }
Taxonomy { public Concept lowestCommonAncestor(String v, String w) { Concept vnode = getConcept(v); Concept wnode = getConcept(w); return lowestCommonAncestor(vnode, wnode); } Taxonomy(String... rootConcept); Concept getRoot(); Concept getConcept(String keyword); List<String> getConcepts(); Concept lowestCommonAncestor(String v, String w); Concept lowestCommonAncestor(Concept v, Concept w);  }