Package gnu.lists

Class IString

    • Constructor Detail

      • IString

        public IString​(java.lang.String str)
    • Method Detail

      • valueOf

        public static IString valueOf​(java.lang.CharSequence str)
      • valueOf

        public static IString valueOf​(java.lang.CharSequence str,
                                      int start,
                                      int count)
      • indexByCodePoints

        public int indexByCodePoints​(int index)
        used for string-ref
      • offsetByCodePoints

        public int offsetByCodePoints​(int i)
        Map character offset to char offset. Caller is responsible for checking that i >=0 && i <= cplength.
      • lengthByCodePoints

        public int lengthByCodePoints()
      • size

        public int size()
        Description copied from interface: Sequence
        See java.util.List.
        Specified by:
        size in interface java.util.Collection<Char>
        Specified by:
        size in interface java.util.List<Char>
        Specified by:
        size in interface Sequence<Char>
        Overrides:
        size in class AbstractSequence<Char>
      • charAt

        public char charAt​(int i)
        To implement CharSequence
        Specified by:
        charAt in interface java.lang.CharSequence
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface java.lang.CharSequence
        Overrides:
        toString in class AbstractSequence<Char>
      • length

        public int length()
        Specified by:
        length in interface java.lang.CharSequence
      • subSequence

        public IString subSequence​(int from,
                                   int to)
        Substring using offsets in code-units (16-bit chars).
        Specified by:
        subSequence in interface java.lang.CharSequence
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • toCharArray

        public char[] toCharArray()
      • getBytes

        public byte[] getBytes​(java.lang.String charsetName)
                        throws java.io.UnsupportedEncodingException
        Throws:
        java.io.UnsupportedEncodingException
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<Char>
        Specified by:
        hashCode in interface java.util.List<Char>
        Overrides:
        hashCode in class AbstractSequence<Char>
      • equals

        public boolean equals​(java.lang.Object other)
        Specified by:
        equals in interface java.util.Collection<Char>
        Specified by:
        equals in interface java.util.List<Char>
        Overrides:
        equals in class AbstractSequence<Char>
      • compareTo

        public int compareTo​(IString other)
        Specified by:
        compareTo in interface java.lang.Comparable<IString>