@Test public void testToString() { ProcessorDependencyGraph graph = new ProcessorDependencyGraph(); ProcessorGraphNode root1 = new ProcessorGraphNode(new TestProcessor("root1"), new MetricRegistry()); ProcessorGraphNode root2 = new ProcessorGraphNode(new TestProcessor("root2"), new MetricRegistry()); ProcessorGraphNode dep11 = new ProcessorGraphNode(new TestProcessor("dep11"), new MetricRegistry()); ProcessorGraphNode dep21 = new ProcessorGraphNode(new TestProcessor("dep21"), new MetricRegistry()); ProcessorGraphNode dep11_1 = new ProcessorGraphNode(new TestProcessor("dep11_1"), new MetricRegistry()); ProcessorGraphNode dep11_2 = new ProcessorGraphNode(new TestProcessor("dep11_2"), new MetricRegistry()); graph.addRoot(root1); graph.addRoot(root2); root1.addDependency(dep11); root2.addDependency(dep21); dep11.addDependency(dep11_1); dep11.addDependency(dep11_2); assertEquals("\"?\" -> \"dep11_1\";\n", dep11_1.toString()); assertTrue(dep11.toString(), "\"?\" -> \"dep11\";\n \"dep11\" -> \"dep11_1\";\n \"dep11\" -> \"dep11_2\";\n" .equals(dep11.toString()) || "\"?\" -> \"dep11\";\n \"dep11\" -> \"dep11_2\";\n \"dep11\" -> \"dep11_1\";\n" .equals(dep11.toString())); assertEquals("\"?\" -> \"root2\";\n \"root2\" -> \"dep21\";\n", root2.toString()); }
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("strict digraph g {\n" + " rankdir=\"LR\";\n" + " node [shape=\"box\"];\n"); toString(builder, 0, "root"); builder.append("}"); return builder.toString(); }
ProcessorDependencyGraph { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("strict digraph g {\n" + " rankdir=\"LR\";\n" + " node [shape=\"box\"];\n"); toString(builder, 0, "root"); builder.append("}"); return builder.toString(); } }
ProcessorDependencyGraph { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("strict digraph g {\n" + " rankdir=\"LR\";\n" + " node [shape=\"box\"];\n"); toString(builder, 0, "root"); builder.append("}"); return builder.toString(); } ProcessorDependencyGraph(); }
ProcessorDependencyGraph { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("strict digraph g {\n" + " rankdir=\"LR\";\n" + " node [shape=\"box\"];\n"); toString(builder, 0, "root"); builder.append("}"); return builder.toString(); } ProcessorDependencyGraph(); ProcessorGraphForkJoinTask createTask(@Nonnull final Values values); @SuppressWarnings("unchecked") Multimap<String, Processor> getAllRequiredAttributes(); List<ProcessorGraphNode<?, ?>> getRoots(); @Override String toString(); void toString(final StringBuilder builder, final int indent, final String parent); Set<Processor<?, ?>> getAllProcessors(); }
ProcessorDependencyGraph { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("strict digraph g {\n" + " rankdir=\"LR\";\n" + " node [shape=\"box\"];\n"); toString(builder, 0, "root"); builder.append("}"); return builder.toString(); } ProcessorDependencyGraph(); ProcessorGraphForkJoinTask createTask(@Nonnull final Values values); @SuppressWarnings("unchecked") Multimap<String, Processor> getAllRequiredAttributes(); List<ProcessorGraphNode<?, ?>> getRoots(); @Override String toString(); void toString(final StringBuilder builder, final int indent, final String parent); Set<Processor<?, ?>> getAllProcessors();  }