Interface ICodepointIterator

    • Method Detail

      • hasNext

        default boolean hasNext()
        Specified by:
        hasNext in interface Iterator<Codepoint>
        Returns:
        true if there are codepoints remaining
      • lastPosition

        @CheckForSigned
        int lastPosition()
        Returns:
        the final index position
      • nextChars

        @Nullable
        char[] nextChars()
        Returns:
        the next chars. If the codepoint is not supplemental, the char array will have a single member. If the codepoint is supplemental, the char array will have two members, representing the high and low surrogate chars
      • peekChars

        @Nullable
        char[] peekChars()
        Returns:
        Peek the next chars in the iterator. If the codepoint is not supplemental, the char array will have a single member. If the codepoint is supplemental, the char array will have two members, representing the high and low surrogate chars
      • position

        void position​(@Nonnegative
                      int nPos)
        Set the iterator position
        Parameters:
        nPos - new position
      • position

        @Nonnegative
        int position()
        Returns:
        the iterator position
      • limit

        @Nonnegative
        int limit()
        Returns:
        the iterator limit
      • remaining

        @Nonnegative
        int remaining()
        Returns:
        the remaining iterator size
      • isHigh

        boolean isHigh​(@Nonnegative
                       int nIndex)
        Parameters:
        nIndex - index
        Returns:
        true if the char at the specified index is a high surrogate
      • isLow

        boolean isLow​(@Nonnegative
                      int nIndex)
        Parameters:
        nIndex - index
        Returns:
        true if the char at the specified index is a low surrogate