| java.lang.Object org.apache.commons.jrcs.rcs.Path
Path | class Path (Code) | | A path from the head revision to a given revision in an Archive.
Path collaborates with Node in applying the set of deltas contained
in archive nodes to arrive at the text of the revision corresponding
to the last node in the path.
This class is NOT thread safe.
See Also: Archive See Also: Node author: Juanco Anez version: $Id: Path.java 2967 2005-10-26 10:52:33Z ian@caret.cam.ac.uk $ |
Constructor Summary | |
public | Path() |
Method Summary | |
public void | add(Node node) Add a node to the Path. | public Node | last() Return the last node in the path or null if the path is empty. | public List | patch() Returns the text that corresponds to applying the patches
in the list of nodes in the Path. | public List | patch(boolean annotate) Returns the text that corresponds to applying the patches
in the list of nodes in the Path.
Assume that the text of the first node is plaintext and not
deltatext.
Parameters: annotate - if true, then each text line is aLine Line with the original text annotated withthe revision in which it was last changed or added. | public List | patch(List lines) Returns the text that corresponds to applying the patches
in the list of nodes in the Path.
Assume that the text of the first node is plaintext and not
deltatext.
Parameters: lines - The list to where the text must be added and thepatches applied.Line Line with the original text annotated withthe revision in which it was last changed or added. | public List | patch(List lines, boolean annotate) Returns the text that corresponds to applying the patches
in the list of nodes in the Path.
Assume that the text of the first node is plaintext and not
deltatext.
Parameters: lines - The list to where the text must be added and thepatches applied. Parameters: annotate - if true, then each text line is aLine Line with the original text annotated withthe revision in which it was last changed or added. | public int | size() The size of the Path. |
Path | public Path()(Code) | | Creates an empty Path
|
add | public void add(Node node)(Code) | | Add a node to the Path.
Parameters: node - The Node to add. |
last | public Node last()(Code) | | Return the last node in the path or null if the path is empty.
the last node in the path or null if the path is empty. |
patch | public List patch(boolean annotate) throws InvalidFileFormatException, PatchFailedException, NodeNotFoundException(Code) | | Returns the text that corresponds to applying the patches
in the list of nodes in the Path.
Assume that the text of the first node is plaintext and not
deltatext.
Parameters: annotate - if true, then each text line is aLine Line with the original text annotated withthe revision in which it was last changed or added. The resulting text after the patches |
patch | public List patch(List lines) throws InvalidFileFormatException, PatchFailedException, NodeNotFoundException(Code) | | Returns the text that corresponds to applying the patches
in the list of nodes in the Path.
Assume that the text of the first node is plaintext and not
deltatext.
Parameters: lines - The list to where the text must be added and thepatches applied.Line Line with the original text annotated withthe revision in which it was last changed or added. The resulting text after the patches |
patch | public List patch(List lines, boolean annotate) throws InvalidFileFormatException, PatchFailedException, NodeNotFoundException(Code) | | Returns the text that corresponds to applying the patches
in the list of nodes in the Path.
Assume that the text of the first node is plaintext and not
deltatext.
Parameters: lines - The list to where the text must be added and thepatches applied. Parameters: annotate - if true, then each text line is aLine Line with the original text annotated withthe revision in which it was last changed or added. The resulting text after the patches |
size | public int size()(Code) | | The size of the Path.
The size of the Path |
|
|