Package gnu.lists

Interface CharSeq

    • Method Detail

      • length

        int length()
        Get length of string, in code units (not characters). In contract, size() returns the number of 16-bit code points.
        Specified by:
        length in interface java.lang.CharSequence
      • charAt

        char charAt​(int index)
        The index is in terms of code units.
        Specified by:
        charAt in interface java.lang.CharSequence
      • getChars

        void getChars​(int srcBegin,
                      int srcEnd,
                      char[] dst,
                      int dstBegin)
        Copy characters into a destination buffer. Same interface as java.lang.String's getChars.
        Parameters:
        srcBegin - source start position, in 16-bit code units.
        srcEnd - source end position, in 16-bit code units.
        dst - destination
        dstBegin - index (in code units) in dst array
      • setCharAt

        void setCharAt​(int index,
                       char ch)
      • setCharacterAt

        void setCharacterAt​(int index,
                            int ch)
      • writeTo

        void writeTo​(int start,
                     int count,
                     java.lang.Appendable dest)
              throws java.io.IOException
        Append a specified subsequence to an Appendable. An allowable implementation is: dest.append(this, start, start+count). Hence implementors of Appendable should avoid calling writeTo - though they can call getChars.
        Throws:
        java.io.IOException
      • writeTo

        void writeTo​(java.lang.Appendable dest)
              throws java.io.IOException
        Throws:
        java.io.IOException
      • toString

        java.lang.String toString()
        Specified by:
        toString in interface java.lang.CharSequence
        Overrides:
        toString in class java.lang.Object
      • isEmpty

        boolean isEmpty()
        Description copied from interface: Sequence
        True is this sequence contains no elements.
        Specified by:
        isEmpty in interface java.util.Collection<Char>
        Specified by:
        isEmpty in interface java.util.List<Char>
        Specified by:
        isEmpty in interface Sequence<Char>