net.sf.vex.dom
Interface Content

All Known Implementing Classes:
GapContent

public interface Content

Interface for classes that manage a string of characters representing the content of a document.


Method Summary
 Position createPosition(int offset)
          Creates a new Position object at the given initial offset.
 int getLength()
          Return the length of the content.
 java.lang.String getString(int offset, int length)
          Gets a substring of the content.
 void insertString(int offset, java.lang.String s)
          Insert a string into the content.
 void remove(int offset, int length)
          Deletes the given range of characters.
 

Method Detail

createPosition

public Position createPosition(int offset)
Creates a new Position object at the given initial offset.

Parameters:
offset - initial offset of the position

insertString

public void insertString(int offset,
                         java.lang.String s)
Insert a string into the content.

Parameters:
offset - Offset at which to insert the string.
s - String to insert.

remove

public void remove(int offset,
                   int length)
Deletes the given range of characters.

Parameters:
offset - Offset from which characters should be deleted.
length - Number of characters to delete.

getString

public java.lang.String getString(int offset,
                                  int length)
Gets a substring of the content.

Parameters:
offset - Offset at which the string begins.
length - Number of characters to return.

getLength

public int getLength()
Return the length of the content.