MCPcopy Create free account
hub / github.com/LianjiaTech/json-diff / PathModule

Class PathModule

src/main/java/com/ke/diff/model/PathModule.java:13–121  ·  view source on GitHub ↗

路径模型 A和B比较时,实时更新当前正在进行比较的元素路径。 @Author JingWei @create 2022/2/15

Source from the content-addressed store, hash-verified

11 * @create 2022/2/15
12 */
13public class PathModule {
14 /**
15 * 对象A当前遍历到的路径
16 */
17 private LinkedList<String> leftPath;
18 /**
19 * 对象B当前遍历到的路径
20 */
21 private LinkedList<String> rightPath;
22 /**
23 * 特殊路径集合。当前路径符合特殊路径且特殊路径下比较结果相同,会在返回结果中做额外标识标识。
24 */
25 private List<String> specialPath;
26 /**
27 * 噪音字段集合。如果当前路径符合噪音字段路径,则不会比较。
28 */
29 private List<String> noisePahList;
30
31 public PathModule() {
32 this.leftPath = new LinkedList<>();
33 this.rightPath = new LinkedList<>();
34 }
35
36 public PathModule(List<String> noisePahList) {
37 this.leftPath = new LinkedList<>();
38 this.rightPath = new LinkedList<>();
39 this.noisePahList = noisePahList;
40 }
41
42 public PathModule(List<String> noisePahList, List<String> specialPath) {
43 this.leftPath = new LinkedList<>();
44 this.rightPath = new LinkedList<>();
45 this.noisePahList = noisePahList;
46 this.specialPath = specialPath;
47 }
48
49 public List<String> getNoisePahList() {
50 return noisePahList;
51 }
52
53 public void setNoisePahList(List<String> noisePahList) {
54 this.noisePahList = noisePahList;
55 }
56
57 public List<String> getSpecialPath() {
58 return specialPath;
59 }
60
61 public void setSpecialPath(LinkedList<String> specialPath) {
62 this.specialPath = specialPath;
63 }
64
65 public LinkedList<String> getLeftPath() {
66 return leftPath;
67 }
68
69 public void setLeftPath(LinkedList<String> leftPath) {
70 this.leftPath = leftPath;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected