Package com.day.util.diff
Class Document
java.lang.Object
com.day.util.diff.Document
A document represents a list of elements and have a source.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
The annotated element include the document source.static interface
Elements form a document. -
Constructor Summary
ConstructorsConstructorDescriptionDocument
(DocumentSource source, ElementsFactory factory) Create a new document with the given source and element factory -
Method Summary
Modifier and TypeMethodDescriptionCreate a diff between this document and the given one.Create a tree-way-diff using this document as base.Return the elements of this documentReturn the source of this documentreverseDiff
(Document left) Create a diff between the given document and this one.
-
Constructor Details
-
Document
Create a new document with the given source and element factory- Parameters:
source
- the sourcefactory
- the element factory
-
-
Method Details
-
getSource
Return the source of this document- Returns:
- the source.
-
getElements
Return the elements of this document- Returns:
- the elements.
-
diff
Create a diff between this document and the given one.- Parameters:
right
- the other document to diff to.- Returns:
- a diff.
-
reverseDiff
Create a diff between the given document and this one.- Parameters:
left
- the other document.- Returns:
- a diff
-
diff3
Create a tree-way-diff using this document as base.- Parameters:
left
- the left documentright
- the right document- Returns:
- a diff3
-