Package gnu.lists

Class CharBuffer

    • Constructor Detail

      • CharBuffer

        public CharBuffer​(FString str)
      • CharBuffer

        public CharBuffer​(int initialSize)
      • CharBuffer

        protected CharBuffer()
    • Method Detail

      • getArray

        public char[] getArray()
      • isAfterPos

        public boolean isAfterPos​(int ipos)
        Description copied from class: AbstractSequence
        Tests whether the position has the "isAfter" property. I.e. if something is inserted at the position, will the iterator end up being after the new data?
        Overrides:
        isAfterPos in class SimpleVector<Char>
      • nextPos

        public int nextPos​(int ipos)
        Description copied from class: AbstractSequence
        Return the next position following the argument. The new position has the isAfter property. The argument is implicitly released (as in releasePos). Returns 0 if we are already at end of file.
        Overrides:
        nextPos in class AbstractSequence<Char>
      • copyPos

        public int copyPos​(int ipos)
        Description copied from class: AbstractSequence
        Make a copy of a position int. For simple positions returns the argument. However, if the positions are magic cookies that are actively managed by the sequence (as opposed to for example a simple index), then making a copy may need to increment a reference count, or maybe allocate a new position cookie. In any case, the new position is initialized to the same offset (and isAfter property) as the original.
        Overrides:
        copyPos in class AbstractSequence<Char>
        Parameters:
        ipos - the position being copied.
        Returns:
        the new position
      • nextIndex

        public int nextIndex​(int ipos)
        Description copied from class: AbstractSequence
        Get the offset from the beginning corresponding to a position cookie.
        Overrides:
        nextIndex in class FString
      • releasePos

        public void releasePos​(int ipos)
        Description copied from class: AbstractSequence
        Reclaim any resources used by the given position int.
        Overrides:
        releasePos in class AbstractSequence<Char>
        Parameters:
        ipos - the Pos being free'd.
      • createPos

        public int createPos​(int index,
                             boolean isAfter)
        Description copied from class: AbstractSequence
        Generate a position at a given index. The result is a position cookie that must be free'd with releasePos.
        Overrides:
        createPos in class FString
        Parameters:
        index - offset from beginning of desired position
        isAfter - should the position have the isAfter property
      • insert

        public void insert​(int where,
                           int ch,
                           boolean beforeMarkers)
        Overrides:
        insert in class FString
      • insert

        public void insert​(int where,
                           String str,
                           boolean beforeMarkers)
        Overrides:
        insert in class FString
      • writeTo

        public void writeTo​(int start,
                            int count,
                            Appendable dest)
                     throws IOException
        Description copied from interface: CharSeq
        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.
        Specified by:
        writeTo in interface CharSeq
        Overrides:
        writeTo in class FString
        Throws:
        IOException
      • dump

        public void dump()