| java.lang.Object uk.org.ponder.stringutil.CharWrapVector
CharWrapVector | public class CharWrapVector (Code) | | This class allows chunk-wise manipulation of character data, in the form of
a vector of CharWrap objects.
|
Constructor Summary | |
public | CharWrapVector(int size) Constructs a new CharWrapVector with the specified initial size. |
Method Summary | |
public void | append(CharWrap toappend) Appends the supplied CharWrap object onto the end of this CharWrapVector. | public void | append(CharWrapVector other, int offset, int length) Appends the specified portion of the supplied CharWrapVector onto the end of this
CharWrapVector. | public CharWrap | charWrapAt(int i) Returns the CharWrap object at the specified index.
Parameters: i - The index of the required CharWrap object. | public int | compareRange(int thisoffset, CharWrapVector other, int otheroffset, int length) This method compares the range of this vector with a range of the same length
in another. | public CharWrap[] | getArray() Returns the contents of this CharWrapVector as an array of CharWrap. | public int | size() Returns the number of elements in this CharWrapVector. | public String | toDebugString() Converts this CharWrapVector to a String for debugging purposes. |
CharWrapVector | public CharWrapVector(int size)(Code) | | Constructs a new CharWrapVector with the specified initial size.
Parameters: size - The initial size of the new CharWrapVector. |
append | public void append(CharWrap toappend)(Code) | | Appends the supplied CharWrap object onto the end of this CharWrapVector.
Parameters: toappend - The CharWrap to be appended. |
append | public void append(CharWrapVector other, int offset, int length)(Code) | | Appends the specified portion of the supplied CharWrapVector onto the end of this
CharWrapVector.
Parameters: other - The CharWrapVector holding the CharWraps to be appended. Parameters: offset - The start index of the CharWraps to be appended. Parameters: length - The number of CharWraps to be appended. |
charWrapAt | public CharWrap charWrapAt(int i)(Code) | | Returns the CharWrap object at the specified index.
Parameters: i - The index of the required CharWrap object. The CharWrap object at the specified index. |
compareRange | public int compareRange(int thisoffset, CharWrapVector other, int otheroffset, int length)(Code) | | This method compares the range of this vector with a range of the same length
in another. If there is a mismatch, the index of the mismatch is returned - otherwise
it returns -1.
Parameters: thisoffset - The offset within this CharWrapVector to begin the comparison at. Parameters: other - The other CharWrapVector to compare this object with. Parameters: otheroffset - The offset within the other CharWrapVector to begin the comparison at. Parameters: length - The common length of the segments to be compared from each CharWrapVector. -1 if the specified ranges match exactly, otherwise the index of the mismatchpoint from the offset position. |
getArray | public CharWrap[] getArray()(Code) | | Returns the contents of this CharWrapVector as an array of CharWrap. The represented
data will start at index 0 of this array.
The contents of this CharWrapVector as an array of CharWrap. |
size | public int size()(Code) | | Returns the number of elements in this CharWrapVector.
The number of elements in this CharWrapVector. |
toDebugString | public String toDebugString()(Code) | | Converts this CharWrapVector to a String for debugging purposes. Word boundaries
are represented with the character |.
The data in this CharWrapVector as a String for debugging purposes. |
|
|