private int consumeChar() {
        final int peek = this.peeked;
        if (peek == INVALID_CODEPOINT) {
            return iterator.hasNext() ? iterator.nextInt() : INVALID_CODEPOINT;
        }
        else {
            this.peeked = INVALID_CODEPOINT;
            return peek;
        }
    }
Creates a new pattern read for processing the given string.
@param sequence String with the pattern to process.
@param visitor Visitor to call for each encountered token of the pattern.
primefaces/src/main/java/org/primefaces/convert/PatternReader.java