code: public static boolean survived(String topic, List<Pattern> blacklist, List<Pattern> whitelist) {
      if (stringInPatterns(topic, blacklist)) {
        return false;
      }
      return (whitelist.isEmpty() || stringInPatterns(topic, whitelist));
    }
docs: A topic survives if (1) it doesn't match the blacklist, and
  (2) either whitelist is empty, or it matches the whitelist.
  Whitelist and blacklist use regex patterns (NOT glob patterns).