MCPcopy Create free account
hub / github.com/apache/storm / printRec

Method printRec

storm-server/src/main/java/org/apache/storm/Testing.java:605–624  ·  view source on GitHub ↗
(Object o, String prefix)

Source from the content-addressed store, hash-verified

603 }
604
605 private static void printRec(Object o, String prefix) {
606 if (o instanceof Collection) {
607 LOG.info("{} {} ({}) [", prefix, o, o.getClass());
608 for (Object sub : (Collection) o) {
609 printRec(sub, prefix + " ");
610 }
611 LOG.info("{} ]", prefix);
612 } else if (o instanceof Map) {
613 Map<?, ?> m = (Map<?, ?>) o;
614 LOG.info("{} {} ({}) {", prefix, o, o.getClass());
615 for (Map.Entry<?, ?> entry : m.entrySet()) {
616 printRec(entry.getKey(), prefix + " ");
617 LOG.info("{} ->", prefix);
618 printRec(entry.getValue(), prefix + " ");
619 }
620 LOG.info("{} }", prefix);
621 } else {
622 LOG.info("{} {} ({})", prefix, o, o.getClass());
623 }
624 }
625
626 /**
627 * Check if two collections are equivalent ignoring the order of elements.

Callers 1

multiseteqMethod · 0.95

Calls 3

entrySetMethod · 0.65
getValueMethod · 0.65
getKeyMethod · 0.45

Tested by

no test coverage detected