@Test public void testSimple() { final String text = "Topologies:\n" + " Sub-topology: 0\n" + " Source: KSTREAM-SOURCE-0000000000 (topics: [a])\n" + " --> KSTREAM-MERGE-0000000001\n" + "\n" + " Processor: KSTREAM-MERGE-0000000001 (stores: [])\n" + " --> KSTREAM-SINK-0000000002\n" + " <-- KSTREAM-SOURCE-0000000000\n" + "\n" + " Sink: KSTREAM-SINK-0000000002 (topic: c)\n" + " <-- KSTREAM-MERGE-0000000001"; final KStreamsTopologyDescriptionParser parser = new KStreamsTopologyDescriptionParser(text); assertEquals(3, parser.size()); }
public int size() { return this.topologies.stream().mapToInt(x -> x.size()).sum(); }
KStreamsTopologyDescriptionParser { public int size() { return this.topologies.stream().mapToInt(x -> x.size()).sum(); } }
KStreamsTopologyDescriptionParser { public int size() { return this.topologies.stream().mapToInt(x -> x.size()).sum(); } KStreamsTopologyDescriptionParser(@Nonnull final String script); }
KStreamsTopologyDescriptionParser { public int size() { return this.topologies.stream().mapToInt(x -> x.size()).sum(); } KStreamsTopologyDescriptionParser(@Nonnull final String script); @Nonnull static String replaceProperties(@Nonnull final String script,
                                         @Nonnull final Properties properties); @Nonnull static String properties2str(@Nonnull final Properties properties); @Nullable String getProperty(@Nonnull final String key, @Nullable final String dflt); int size(); @Override @Nonnull String toString(); @Nonnull Optional<TopologyElement> findForId(@Nonnull final String id); @Nonnull @MustNotContainNull List<Topologies> getTopologies(); }
KStreamsTopologyDescriptionParser { public int size() { return this.topologies.stream().mapToInt(x -> x.size()).sum(); } KStreamsTopologyDescriptionParser(@Nonnull final String script); @Nonnull static String replaceProperties(@Nonnull final String script,
                                         @Nonnull final Properties properties); @Nonnull static String properties2str(@Nonnull final Properties properties); @Nullable String getProperty(@Nonnull final String key, @Nullable final String dflt); int size(); @Override @Nonnull String toString(); @Nonnull Optional<TopologyElement> findForId(@Nonnull final String id); @Nonnull @MustNotContainNull List<Topologies> getTopologies();  }