|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.suigeneris.jrcs.rcs.impl.Path
public class Path
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.
Archive
,
Node
Field Summary | |
---|---|
private java.util.List |
path
|
Constructor Summary | |
---|---|
Path()
Creates an empty Path |
Method Summary | |
---|---|
void |
add(Node node)
Add a node to the Path. |
Node |
beforeLast()
Return the node before the last in the path. |
Node |
last()
Return the last node in the path or null if the path is empty. |
java.util.List |
patch()
Returns the text that corresponds to applying the patches in the list of nodes in the Path. |
java.util.List |
patch(boolean annotate)
Returns the text that corresponds to applying the patches in the list of nodes in the Path. |
java.util.List |
patch(java.util.List lines)
Returns the text that corresponds to applying the patches in the list of nodes in the Path. |
java.util.List |
patch(java.util.List lines,
boolean annotate)
Returns the text that corresponds to applying the patches in the list of nodes in the Path. |
int |
size()
The size of the Path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.List path
Constructor Detail |
---|
public Path()
Method Detail |
---|
public void add(Node node)
node
- The Node to add.public int size()
public Node last()
public Node beforeLast()
public java.util.List patch() throws InvalidFileFormatException, PatchFailedException, NodeNotFoundException
InvalidFileFormatException
PatchFailedException
NodeNotFoundException
public java.util.List patch(boolean annotate) throws InvalidFileFormatException, PatchFailedException, NodeNotFoundException
annotate
- if true, then each text line is a Line
with the
original text annotated with the revision in which it was last
changed or added.
InvalidFileFormatException
PatchFailedException
NodeNotFoundException
public java.util.List patch(java.util.List lines) throws InvalidFileFormatException, PatchFailedException, NodeNotFoundException
lines
- The list to where the text must be added and the patches
applied. Line
with the original text annotated
with the revision in which it was last changed or added.
InvalidFileFormatException
PatchFailedException
NodeNotFoundException
public java.util.List patch(java.util.List lines, boolean annotate) throws InvalidFileFormatException, PatchFailedException, NodeNotFoundException
lines
- The list to where the text must be added and the patches
applied.annotate
- if true, then each text line is a Line
with the
original text annotated with the revision in which it was last
changed or added.
InvalidFileFormatException
PatchFailedException
NodeNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |