You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[](https://github.com/java-diff-utils/java-diff-utils/actions?query=workflow%3A%22Java+CI+with+Maven%22)
[](https://github.com/java-diff-utils/java-diff-utils/actions?query=workflow%3A%22Java+CI+with+Maven%22)
Diff Utils library is anOpenSourcelibrary for performing the comparison operations between texts: computing diffs, applying patches, generating unified diffs or parsing them, generating diff output for easy future displaying (like side-by-side view) and so on.
Diff Utils library is anopen sourcelibrary for performing comparison operations between texts: computing diffs, applying patches, generating unified diffs or parsing them, generating diff output for easy future displaying (like side-by-side view) and so on.
Mainreason to build this library was the lack of easy-to-use libraries with all the usual stuff you need while working with diff files. Originally it was inspired by JRCS library andit's nice design of diff module.
The mainreason to build this library was the lack of easy-to-use libraries with all the usual stuff you need while working with diff files. Originally it was inspired by JRCS library andits nice design of diff module.
**This is originally a fork of java-diff-utils from Google Code Archive.**
## GPG Signature Validation
The gpg singing key in [KEYS] is used for thisprojects artifacts.
The gpg singing key in [KEYS] is used for thisproject's artifacts.
## API
Javadocs of the actual release version: [JavaDocs java-diff-utils](https://java-diff-utils.github.io/java-diff-utils/4.10/docs/apidocs/)
Javadocs of the actual release version: [Javadocs java-diff-utils](https://java-diff-utils.github.io/java-diff-utils/4.10/docs/apidocs/)
## Examples
Look [here](https://github.com/java-diff-utils/java-diff-utils/wiki) to find more helpfulinformations and examples.
Look [here](https://github.com/java-diff-utils/java-diff-utils/wiki) to find more helpfulinformation and examples.
These two outputs are generated usingthisjava-diff-utils. The source code can also be found at the *Examples* page:
These two outputs are generated using java-diff-utils. The source code can also be found at the *Examples* page:
**Producing a one liner including all difference information.**
Arrays.asList("This is a testsenctence.", "This is the second line.", "And here is the finish."),
Arrays.asList("This is a testsentence.", "This is the second line.", "And here is the finish."),
Arrays.asList("This is a test for diffutils.", "This is the second line."));
System.out.println("|original|new|");
System.out.println("|--------|---|");
for (DiffRow row : rows) {
Expand All
@@ -76,14 +76,14 @@ for (DiffRow row : rows) {
|original|new|
|--------|---|
|This is a test ~senctence~.|This is a test **for diffutils**.|
|This is a test ~sentence~.|This is a test **for diffutils**.|
|This is the second line.|This is the second line.|
|~And here is the finish.~||
## Main Features
*computing the difference between two texts.
*capable tohand more than plainascii. Arrays or List of any type that implements hashCode() and equals() correctly can be subject to differencing using this library
*Computing the difference between two texts.
*Capable tohandle more than plainASCII. Arrays or List of any type that implements hashCode() and equals() correctly can be subject to differencing using this library
* patch and unpatch the text with the given patch
* parsing the unified diff format
* producing human-readable differences
Expand All
@@ -95,10 +95,10 @@ for (DiffRow row : rows) {
### Algorithms
*Myer's diff
*Myers diff
* HistogramDiff
But it can easily replaced by any other which is better forhanding your texts. I have plan to add implementation of some in future.
But it can easilybereplaced by any other which is better forhandling your texts. I haveaplan to addtheimplementation of some in the future.
## Source Code conventions
Expand All
@@ -123,7 +123,7 @@ This is a valid piece of source code:
### To Install
Just add the code below to yourmaven dependencies:
Just add the code below to yourMaven dependencies:
```xml
<dependency>
Expand All
@@ -133,7 +133,7 @@ Just add the code below to your maven dependencies:
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.