@Test public void testOverlap() { Set<Class<? extends Annotation>> a = new HashSet<>(); Set<Class<? extends Annotation>> b = new HashSet<>(); Set<Class<? extends Annotation>> c = new HashSet<>(); Set<Class<? extends Annotation>> d = new HashSet<>(); a.add(Person.class); a.add(Organisation.class); b.add(Location.class); b.add(Buzzword.class); c.add(Coordinate.class); d.add(Location.class); assertFalse(DependencyGraph.overlaps(a, b)); assertFalse(DependencyGraph.overlaps(a, c)); assertTrue(DependencyGraph.overlaps(b, c)); assertTrue(DependencyGraph.overlaps(b, d)); }
public static boolean overlaps( Set<Class<? extends Annotation>> s1, Set<Class<? extends Annotation>> s2) { for (Class<? extends Annotation> c1 : s1) { for (Class<? extends Annotation> c2 : s2) { if (c1.isAssignableFrom(c2)) return true; } } return false; }
DependencyGraph implements IPipelineOrderer { public static boolean overlaps( Set<Class<? extends Annotation>> s1, Set<Class<? extends Annotation>> s2) { for (Class<? extends Annotation> c1 : s1) { for (Class<? extends Annotation> c2 : s2) { if (c1.isAssignableFrom(c2)) return true; } } return false; } }
DependencyGraph implements IPipelineOrderer { public static boolean overlaps( Set<Class<? extends Annotation>> s1, Set<Class<? extends Annotation>> s2) { for (Class<? extends Annotation> c1 : s1) { for (Class<? extends Annotation> c2 : s2) { if (c1.isAssignableFrom(c2)) return true; } } return false; }  }
DependencyGraph implements IPipelineOrderer { public static boolean overlaps( Set<Class<? extends Annotation>> s1, Set<Class<? extends Annotation>> s2) { for (Class<? extends Annotation> c1 : s1) { for (Class<? extends Annotation> c2 : s2) { if (c1.isAssignableFrom(c2)) return true; } } return false; }  @Override List<AnalysisEngine> orderPipeline(List<AnalysisEngine> analysisEngines); static boolean overlaps(
      Set<Class<? extends Annotation>> s1, Set<Class<? extends Annotation>> s2); static void removeLoops(Graph<V, E> graph); static Set<V> removeLayer(Graph<V, E> graph); }
DependencyGraph implements IPipelineOrderer { public static boolean overlaps( Set<Class<? extends Annotation>> s1, Set<Class<? extends Annotation>> s2) { for (Class<? extends Annotation> c1 : s1) { for (Class<? extends Annotation> c2 : s2) { if (c1.isAssignableFrom(c2)) return true; } } return false; }  @Override List<AnalysisEngine> orderPipeline(List<AnalysisEngine> analysisEngines); static boolean overlaps(
      Set<Class<? extends Annotation>> s1, Set<Class<? extends Annotation>> s2); static void removeLoops(Graph<V, E> graph); static Set<V> removeLayer(Graph<V, E> graph);  }