@Test public void checkToSet_EmptySet() { assertEquals(Collections.emptySet(), manager.toCollection("")); }
protected Collection<String> toCollection(final String s) { if (s != null && !s.startsWith(COLLECTION_START_CHAR)) { return new HashSet<>(0); } else if (s != null && s.startsWith(COLLECTION_START_CHAR) && s.endsWith(COLLECTION_END_CHAR)) { final String toParse = s.substring(1, s.length() - 1); final String[] parsed = toParse.split(COLLECTION_DELIMITER); final HashSet<String> result = new HashSet<>(parsed.length); for (String p : parsed) { result.add(p.trim()); } return result; } return new HashSet<>(0); }
AbstractCriteriaLookupManager extends AbstractLookupManager<I, T, R> { protected Collection<String> toCollection(final String s) { if (s != null && !s.startsWith(COLLECTION_START_CHAR)) { return new HashSet<>(0); } else if (s != null && s.startsWith(COLLECTION_START_CHAR) && s.endsWith(COLLECTION_END_CHAR)) { final String toParse = s.substring(1, s.length() - 1); final String[] parsed = toParse.split(COLLECTION_DELIMITER); final HashSet<String> result = new HashSet<>(parsed.length); for (String p : parsed) { result.add(p.trim()); } return result; } return new HashSet<>(0); } }
AbstractCriteriaLookupManager extends AbstractLookupManager<I, T, R> { protected Collection<String> toCollection(final String s) { if (s != null && !s.startsWith(COLLECTION_START_CHAR)) { return new HashSet<>(0); } else if (s != null && s.startsWith(COLLECTION_START_CHAR) && s.endsWith(COLLECTION_END_CHAR)) { final String toParse = s.substring(1, s.length() - 1); final String[] parsed = toParse.split(COLLECTION_DELIMITER); final HashSet<String> result = new HashSet<>(parsed.length); for (String p : parsed) { result.add(p.trim()); } return result; } return new HashSet<>(0); }  }
AbstractCriteriaLookupManager extends AbstractLookupManager<I, T, R> { protected Collection<String> toCollection(final String s) { if (s != null && !s.startsWith(COLLECTION_START_CHAR)) { return new HashSet<>(0); } else if (s != null && s.startsWith(COLLECTION_START_CHAR) && s.endsWith(COLLECTION_END_CHAR)) { final String toParse = s.substring(1, s.length() - 1); final String[] parsed = toParse.split(COLLECTION_DELIMITER); final HashSet<String> result = new HashSet<>(parsed.length); for (String p : parsed) { result.add(p.trim()); } return result; } return new HashSet<>(0); }  static Map<String, String> parseCriteria(final String criteria); static String[] parseCriteriaPair(final String criteria); }
AbstractCriteriaLookupManager extends AbstractLookupManager<I, T, R> { protected Collection<String> toCollection(final String s) { if (s != null && !s.startsWith(COLLECTION_START_CHAR)) { return new HashSet<>(0); } else if (s != null && s.startsWith(COLLECTION_START_CHAR) && s.endsWith(COLLECTION_END_CHAR)) { final String toParse = s.substring(1, s.length() - 1); final String[] parsed = toParse.split(COLLECTION_DELIMITER); final HashSet<String> result = new HashSet<>(parsed.length); for (String p : parsed) { result.add(p.trim()); } return result; } return new HashSet<>(0); }  static Map<String, String> parseCriteria(final String criteria); static String[] parseCriteriaPair(final String criteria);  }