/** * Replaces the currently configured whiteList with a comma separated * string containing the new whiteList. Null or empty string denotes * no whiteList entries, {@value #CATCH_ALL_WILDCARD} indicates that * all classes are whiteListed. * * @param whiteList the whiteList that this policy is configured to recognize. */ public void setWhiteList(String whiteList) { this.whiteList = StringUtil.splitStringList(whiteList, ","); }
/** * Replaces the currently configured blackList with a comma separated * string containing the new blackList. Null or empty string denotes * no blacklist entries, {@value #CATCH_ALL_WILDCARD} indicates that * all classes are blacklisted. * * @param blackList the blackList that this policy is configured to recognize. */ public void setBlackList(String blackList) { this.blackList = StringUtil.splitStringList(blackList, ","); }
/** * Replaces the currently configured blackList with a comma separated * string containing the new blackList. Null or empty string denotes * no blacklist entries, {@value #CATCH_ALL_WILDCARD} indicates that * all classes are blacklisted. * * @param blackList the blackList that this policy is configured to recognize. */ public void setBlackList(String blackList) { this.blackList = StringUtil.splitStringList(blackList, ","); }
/** * Replaces the currently configured blackList with a comma separated * string containing the new blackList. Null or empty string denotes * no blacklist entries, {@value #CATCH_ALL_WILDCARD} indicates that * all classes are blacklisted. * * @param blackList the blackList that this policy is configured to recognize. */ public void setBlackList(String blackList) { this.blackList = StringUtil.splitStringList(blackList, ","); }
/** * Replaces the currently configured blackList with a comma separated * string containing the new blackList. Null or empty string denotes * no blacklist entries, {@value #CATCH_ALL_WILDCARD} indicates that * all classes are blacklisted. * * @param blackList the blackList that this policy is configured to recognize. */ public void setBlackList(String blackList) { this.blackList = StringUtil.splitStringList(blackList, ","); }
/** * Replaces the currently configured blackList with a comma separated * string containing the new blackList. Null or empty string denotes * no blacklist entries, {@value #CATCH_ALL_WILDCARD} indicates that * all classes are blacklisted. * * @param blackList the blackList that this policy is configured to recognize. */ public void setBlackList(String blackList) { this.blackList = StringUtil.splitStringList(blackList, ","); }
/** * Replaces the currently configured whiteList with a comma separated * string containing the new whiteList. Null or empty string denotes * no whiteList entries, {@value #CATCH_ALL_WILDCARD} indicates that * all classes are whiteListed. * * @param whiteList the whiteList that this policy is configured to recognize. */ public void setWhiteList(String whiteList) { this.whiteList = StringUtil.splitStringList(whiteList, ","); }
/** * Replaces the currently configured whiteList with a comma separated * string containing the new whiteList. Null or empty string denotes * no whiteList entries, {@value #CATCH_ALL_WILDCARD} indicates that * all classes are whiteListed. * * @param whiteList the whiteList that this policy is configured to recognize. */ public void setWhiteList(String whiteList) { this.whiteList = StringUtil.splitStringList(whiteList, ","); }
/** * Replaces the currently configured whiteList with a comma separated * string containing the new whiteList. Null or empty string denotes * no whiteList entries, {@value #CATCH_ALL_WILDCARD} indicates that * all classes are whiteListed. * * @param whiteList the whiteList that this policy is configured to recognize. */ public void setWhiteList(String whiteList) { this.whiteList = StringUtil.splitStringList(whiteList, ","); }
/** * Replaces the currently configured blackList with a comma separated * string containing the new blackList. Null or empty string denotes * no blacklist entries, {@value #CATCH_ALL_WILDCARD} indicates that * all classes are blacklisted. * * @param blackList the blackList that this policy is configured to recognize. */ public void setBlackList(String blackList) { this.blackList = StringUtil.splitStringList(blackList, ","); }
/** * Replaces the currently configured whiteList with a comma separated * string containing the new whiteList. Null or empty string denotes * no whiteList entries, {@value #CATCH_ALL_WILDCARD} indicates that * all classes are whiteListed. * * @param whiteList the whiteList that this policy is configured to recognize. */ public void setWhiteList(String whiteList) { this.whiteList = StringUtil.splitStringList(whiteList, ","); }
/** * Replaces the currently configured blackList with a comma separated * string containing the new blackList. Null or empty string denotes * no blacklist entries, {@value #CATCH_ALL_WILDCARD} indicates that * all classes are blacklisted. * * @param blackList the blackList that this policy is configured to recognize. */ public void setBlackList(String blackList) { this.blackList = StringUtil.splitStringList(blackList, ","); }
/** * Replaces the currently configured whiteList with a comma separated * string containing the new whiteList. Null or empty string denotes * no whiteList entries, {@value #CATCH_ALL_WILDCARD} indicates that * all classes are whiteListed. * * @param whiteList the whiteList that this policy is configured to recognize. */ public void setWhiteList(String whiteList) { this.whiteList = StringUtil.splitStringList(whiteList, ","); }
/** * Replaces the currently configured whiteList with a comma separated * string containing the new whiteList. Null or empty string denotes * no whiteList entries, {@value #CATCH_ALL_WILDCARD} indicates that * all classes are whiteListed. * * @param whiteList the whiteList that this policy is configured to recognize. */ public void setWhiteList(String whiteList) { this.whiteList = StringUtil.splitStringList(whiteList, ","); }
@Test public void testJoinStringList() throws Exception { List<String> strList = new ArrayList<>(); strList.add("a"); strList.add("bc"); strList.add("def"); String result = StringUtil.joinStringList(strList, ","); assertEquals("a,bc,def", result); List<String> newList = StringUtil.splitStringList(result, ","); assertEquals(strList.size(), newList.size()); String result2 = StringUtil.joinStringList(newList, ","); assertEquals(result, result2); }
@Test public void testSplitStringList() throws Exception { String listStr = "white,blue,yellow,green"; List<String> result = StringUtil.splitStringList(listStr, ","); assertEquals(4, result.size()); assertEquals("white", result.get(0)); assertEquals("blue", result.get(1)); assertEquals("yellow", result.get(2)); assertEquals("green", result.get(3)); String result2 = StringUtil.joinStringList(result, ","); assertEquals(listStr, result2); } }