-
-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathDiffOperation.java
More file actions
50 lines (40 loc) · 989 Bytes
/
DiffOperation.java
File metadata and controls
50 lines (40 loc) · 989 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package org.herb;
import java.util.Arrays;
public class DiffOperation {
private final String type;
private final int[] path;
private final Object oldNode;
private final Object newNode;
private final int oldIndex;
private final int newIndex;
public DiffOperation(String type, int[] path, Object oldNode, Object newNode, int oldIndex, int newIndex) {
this.type = type;
this.path = path;
this.oldNode = oldNode;
this.newNode = newNode;
this.oldIndex = oldIndex;
this.newIndex = newIndex;
}
public String getType() {
return type;
}
public int[] getPath() {
return path;
}
public Object getOldNode() {
return oldNode;
}
public Object getNewNode() {
return newNode;
}
public int getOldIndex() {
return oldIndex;
}
public int getNewIndex() {
return newIndex;
}
@Override
public String toString() {
return String.format("DiffOperation{type=%s, path=%s}", type, Arrays.toString(path));
}
}