@Override public Codepoint next() { return internal.next(); }
private static int length(CodepointIterator ci) { int n = 0; while (ci.hasNext()) { ci.next(); n++; } return n; }
/** * Verifies a sequence of codepoints using the specified filter */ public static void verifyNot(CodepointIterator ci, Filter filter) throws InvalidCharacterException { CodepointIterator rci = ci.restrict(filter, false, true); while (rci.hasNext()) rci.next(); }
/** * Verifies a sequence of codepoints using the specified filter */ public static void verify(CodepointIterator ci, Filter filter) throws InvalidCharacterException { CodepointIterator rci = CodepointIterator.restrict(ci, filter); while (rci.hasNext()) rci.next(); }
/** * Verifies a sequence of codepoints using the specified profile */ public static void verifyNot(CodepointIterator ci, Profile profile) throws InvalidCharacterException { CodepointIterator rci = ci.restrict(profile.filter(), false, true); while (rci.hasNext()) rci.next(); }
/** * Verifies a sequence of codepoints using the specified filter */ public static void verify(CodepointIterator ci, Profile profile) throws InvalidCharacterException { CodepointIterator rci = CodepointIterator.restrict(ci, profile.filter()); while (rci.hasNext()) rci.next(); }
private static void decompose(CharSequence source, Form form, StringBuilder buf) throws IOException { StringBuilder internal = new StringBuilder(); CodepointIterator ci = CodepointIterator.forCharSequence(source); boolean canonical = form.isCanonical(); while (ci.hasNext()) { Codepoint c = ci.next(); internal.setLength(0); UnicodeCharacterDatabase.decompose(c.getValue(), canonical, internal); CodepointIterator ii = CodepointIterator.forCharSequence(internal); while (ii.hasNext()) { Codepoint ch = ii.next(); int i = findInsertionPoint(buf, ch.getValue()); buf.insert(i, CharUtils.toString(ch.getValue())); } } }
/** * Verifies a sequence of codepoints using the specified profile */ public static void verifyNot(char[] array, Profile profile) throws InvalidCharacterException { CodepointIterator rci = CodepointIterator.forCharArray(array).restrict(profile.filter(), false, true); while (rci.hasNext()) rci.next(); }