| java.lang.Object org.apache.commons.jrcs.util.ToString org.apache.commons.jrcs.diff.Chunk
Constructor Summary | |
public | Chunk(int pos, int count) Creates a chunk that doesn't copy the original text. | public | Chunk(Object[] iseq, int pos, int count) Creates a chunk and saves a copy the original chunk's text. | public | Chunk(Object[] iseq, int pos, int count, int offset) Creates a chunk that will be displaced in the resulting text, and saves a
copy the original chunk's text. | public | Chunk(List iseq, int pos, int count) Creates a chunk and saves a copy the original chunk's text. | public | Chunk(List iseq, int pos, int count, int offset) Creates a chunk that will be displaced in the resulting text, and saves a
copy the original chunk's text. |
Method Summary | |
public int | anchor() Returns the anchor position of the chunk. | public void | applyAdd(int start, List target) Add the text of this chunk to the target at the given position. | public void | applyDelete(List target) Delete this chunk from he given text. | public List | chunk() Returns the text saved for this chunk. | public int | first() Returns the index of the first line of the chunk. | public int | last() Returns the index of the last line of the chunk. | public String | rangeString() Provide a string representation of the numeric range of this chunk. | public void | rangeString(StringBuffer s) Provide a string representation of the numeric range of this chunk. | public void | rangeString(StringBuffer s, String separ) Provide a string representation of the numeric range of this chunk. | public int | rcsfrom() Returns the from index of the chunk in RCS terms. | public int | rcsto() Returns the to index of the chunk in RCS terms. | public int | size() Returns the size of the chunk. | public static List | slice(List seq, int pos, int count) Retreives the specified part from a
List List .
Parameters: seq - the list to retreive a slice from. Parameters: pos - the start position. Parameters: count - the number of items in the slice. | public static List | slice(Object[] seq, int pos, int count) Retrieves a slice from an
Object Object array.
Parameters: seq - the list to retreive a slice from. Parameters: pos - the start position. Parameters: count - the number of items in the slice. | public void | toString(StringBuffer s) Provide a string image of the chunk using the an empty prefix and
postfix. | public StringBuffer | toString(StringBuffer s, String prefix, String postfix) Provide a string image of the chunk using the given prefix and postfix. | public boolean | verify(List target) Verifies that this chunk's saved text matches the corresponding text in
the given sequence.
Parameters: target - the sequence to verify against. |
anchor | protected int anchor(Code) | | |
count | protected int count(Code) | | |
Chunk | public Chunk(int pos, int count)(Code) | | Creates a chunk that doesn't copy the original text.
Parameters: pos - the start position in the text. Parameters: count - the size of the chunk. |
Chunk | public Chunk(Object[] iseq, int pos, int count)(Code) | | Creates a chunk and saves a copy the original chunk's text.
Parameters: iseq - the original text. Parameters: pos - the start position in the text. Parameters: count - the size of the chunk. |
Chunk | public Chunk(Object[] iseq, int pos, int count, int offset)(Code) | | Creates a chunk that will be displaced in the resulting text, and saves a
copy the original chunk's text.
Parameters: iseq - the original text. Parameters: pos - the start position in the text. Parameters: count - the size of the chunk. Parameters: offset - the position the chunk should have in the resulting text. |
Chunk | public Chunk(List iseq, int pos, int count)(Code) | | Creates a chunk and saves a copy the original chunk's text.
Parameters: iseq - the original text. Parameters: pos - the start position in the text. Parameters: count - the size of the chunk. |
Chunk | public Chunk(List iseq, int pos, int count, int offset)(Code) | | Creates a chunk that will be displaced in the resulting text, and saves a
copy the original chunk's text.
Parameters: iseq - the original text. Parameters: pos - the start position in the text. Parameters: count - the size of the chunk. Parameters: offset - the position the chunk should have in the resulting text. |
anchor | public int anchor()(Code) | | Returns the anchor position of the chunk.
the anchor position. |
applyAdd | public void applyAdd(int start, List target)(Code) | | Add the text of this chunk to the target at the given position.
Parameters: start - where to add the text. Parameters: target - the text to add to. |
applyDelete | public void applyDelete(List target)(Code) | | Delete this chunk from he given text.
Parameters: target - the text to delete from. |
chunk | public List chunk()(Code) | | Returns the text saved for this chunk.
the text. |
first | public int first()(Code) | | Returns the index of the first line of the chunk.
|
last | public int last()(Code) | | Returns the index of the last line of the chunk.
|
rangeString | public String rangeString()(Code) | | Provide a string representation of the numeric range of this chunk.
|
rangeString | public void rangeString(StringBuffer s)(Code) | | Provide a string representation of the numeric range of this chunk.
Parameters: s - where the string representation should be appended. |
rangeString | public void rangeString(StringBuffer s, String separ)(Code) | | Provide a string representation of the numeric range of this chunk.
Parameters: s - where the string representation should be appended. Parameters: separ - what to use as line separator. |
rcsfrom | public int rcsfrom()(Code) | | Returns the from index of the chunk in RCS terms.
|
rcsto | public int rcsto()(Code) | | Returns the to index of the chunk in RCS terms.
|
size | public int size()(Code) | | Returns the size of the chunk.
the size. |
slice | public static List slice(List seq, int pos, int count)(Code) | | Retreives the specified part from a
List List .
Parameters: seq - the list to retreive a slice from. Parameters: pos - the start position. Parameters: count - the number of items in the slice. a List List containing the specified items. |
slice | public static List slice(Object[] seq, int pos, int count)(Code) | | Retrieves a slice from an
Object Object array.
Parameters: seq - the list to retreive a slice from. Parameters: pos - the start position. Parameters: count - the number of items in the slice. a List List containing the specified items. |
toString | public void toString(StringBuffer s)(Code) | | Provide a string image of the chunk using the an empty prefix and
postfix.
|
toString | public StringBuffer toString(StringBuffer s, String prefix, String postfix)(Code) | | Provide a string image of the chunk using the given prefix and postfix.
Parameters: s - where the string image should be appended. Parameters: prefix - the text thatshould prefix each line. Parameters: postfix - the text that should end each line. |
verify | public boolean verify(List target)(Code) | | Verifies that this chunk's saved text matches the corresponding text in
the given sequence.
Parameters: target - the sequence to verify against. true if the texts match. |
|
|