@Test public void isTopicFilterTest() { assert Topics.isTopicFilter(Arrays.asList("abc", "+", "g", "h", END)); assert Topics.isTopicFilter(Arrays.asList("abc", "def", "g", "#", END)); assert Topics.isTopicFilter(Arrays.asList("abc", "def", "#", END)); assert Topics.isTopicFilter(Arrays.asList("+", "+", "g", "#", END)); assert !Topics.isTopicFilter(Arrays.asList("abc", "def", "g", "h", END)); assert !Topics.isTopicFilter(Arrays.asList(EMPTY, "abc", "def", "g", "h", END)); }
public static boolean isTopicFilter(List<String> topicLevels) { return topicLevels.contains("+") || topicLevels.get(topicLevels.size() - 2).equals("#"); }
Topics { public static boolean isTopicFilter(List<String> topicLevels) { return topicLevels.contains("+") || topicLevels.get(topicLevels.size() - 2).equals("#"); } }
Topics { public static boolean isTopicFilter(List<String> topicLevels) { return topicLevels.contains("+") || topicLevels.get(topicLevels.size() - 2).equals("#"); } private  Topics(); }
Topics { public static boolean isTopicFilter(List<String> topicLevels) { return topicLevels.contains("+") || topicLevels.get(topicLevels.size() - 2).equals("#"); } private  Topics(); static String antidote(String topic); static String antidote(List<String> topicLevels); static List<String> sanitize(String topic); static List<String> sanitizeTopicName(String topicName); static List<String> sanitizeTopicFilter(String topicFilter); static boolean isTopicFilter(List<String> topicLevels); }
Topics { public static boolean isTopicFilter(List<String> topicLevels) { return topicLevels.contains("+") || topicLevels.get(topicLevels.size() - 2).equals("#"); } private  Topics(); static String antidote(String topic); static String antidote(List<String> topicLevels); static List<String> sanitize(String topic); static List<String> sanitizeTopicName(String topicName); static List<String> sanitizeTopicFilter(String topicFilter); static boolean isTopicFilter(List<String> topicLevels); static final String EMPTY; static final String END; }