forked from jycr/java-diff-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEqualizer.java
More file actions
29 lines (25 loc) · 833 Bytes
/
Equalizer.java
File metadata and controls
29 lines (25 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package difflib.myers;
import javax.annotation.CheckReturnValue;
import javax.annotation.Nullable;
/**
* Specifies when two compared elements in the Myers algorithm are equal.
*
* @param T The type of the compared elements in the 'lines'.
*/
public interface Equalizer<T> {
/**
* Indicates if two elements are equal according to the diff mechanism.
* @param original The original element. Must not be {@code null}.
* @param revised The revised element. Must not be {@code null}.
* @return Returns true if the elements are equal.
*/
@CheckReturnValue
public boolean equals(@Nullable T original, @Nullable T revised);
/**
* Indicates if elements must be skipped.
* @param original
* @return
*/
@CheckReturnValue
public boolean skip(@Nullable T original);
}