@Test public void testGetFirstNotAllowedCodePoint_empty() { String testStr = ""; Set<Integer> allowedCodePointSet = new HashSet<Integer>(); int result = new CodePoints(allowedCodePointSet).firstExcludedCodePoint( testStr); assertThat(result, is(CodePoints.NOT_FOUND)); }
public int firstExcludedCodePoint(String s) { if (s == null || s.isEmpty()) { return NOT_FOUND; } int len = s.length(); int codePoint; for (int i = 0; i < len; i += Character.charCount(codePoint)) { codePoint = s.codePointAt(i); if (!set.contains(codePoint)) { return codePoint; } } return NOT_FOUND; }
CodePoints implements Serializable { public int firstExcludedCodePoint(String s) { if (s == null || s.isEmpty()) { return NOT_FOUND; } int len = s.length(); int codePoint; for (int i = 0; i < len; i += Character.charCount(codePoint)) { codePoint = s.codePointAt(i); if (!set.contains(codePoint)) { return codePoint; } } return NOT_FOUND; } }
CodePoints implements Serializable { public int firstExcludedCodePoint(String s) { if (s == null || s.isEmpty()) { return NOT_FOUND; } int len = s.length(); int codePoint; for (int i = 0; i < len; i += Character.charCount(codePoint)) { codePoint = s.codePointAt(i); if (!set.contains(codePoint)) { return codePoint; } } return NOT_FOUND; } CodePoints(Integer... codePoints);  CodePoints(String... strings);  CodePoints(Collection<Integer> codePoints);  CodePoints(CodePoints codePoints); }
CodePoints implements Serializable { public int firstExcludedCodePoint(String s) { if (s == null || s.isEmpty()) { return NOT_FOUND; } int len = s.length(); int codePoint; for (int i = 0; i < len; i += Character.charCount(codePoint)) { codePoint = s.codePointAt(i); if (!set.contains(codePoint)) { return codePoint; } } return NOT_FOUND; } CodePoints(Integer... codePoints);  CodePoints(String... strings);  CodePoints(Collection<Integer> codePoints);  CodePoints(CodePoints codePoints); boolean containsAll(String s); int firstExcludedCodePoint(String s); Set<Integer> allExcludedCodePoints(String s); CodePoints union(CodePoints codePoints); CodePoints subtract(CodePoints codePoints); CodePoints intersect(CodePoints codePoints); @SuppressWarnings("unchecked") static T of(Class<T> clazz); static boolean containsAllInAnyCodePoints(String s,
            final CodePoints... codePointsList); @Override boolean equals(Object o); @Override int hashCode(); }
CodePoints implements Serializable { public int firstExcludedCodePoint(String s) { if (s == null || s.isEmpty()) { return NOT_FOUND; } int len = s.length(); int codePoint; for (int i = 0; i < len; i += Character.charCount(codePoint)) { codePoint = s.codePointAt(i); if (!set.contains(codePoint)) { return codePoint; } } return NOT_FOUND; } CodePoints(Integer... codePoints);  CodePoints(String... strings);  CodePoints(Collection<Integer> codePoints);  CodePoints(CodePoints codePoints); boolean containsAll(String s); int firstExcludedCodePoint(String s); Set<Integer> allExcludedCodePoints(String s); CodePoints union(CodePoints codePoints); CodePoints subtract(CodePoints codePoints); CodePoints intersect(CodePoints codePoints); @SuppressWarnings("unchecked") static T of(Class<T> clazz); static boolean containsAllInAnyCodePoints(String s,
            final CodePoints... codePointsList); @Override boolean equals(Object o); @Override int hashCode(); static final int NOT_FOUND; }