ExportInfo.java
1.37 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
/*
* Decompiled with CFR 0_118.
*/
package com.day.jcr.vault.fs.io;
import com.day.jcr.vault.util.PathComparator;
import java.util.Comparator;
import java.util.Map;
import java.util.TreeMap;
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
public class ExportInfo {
private final TreeMap<String, Entry> entries = new TreeMap(new PathComparator(true));
public void update(Type type, String path) {
Entry e = this.entries.get(path);
if (e == null) {
e = new Entry(type, path);
} else if (e.type != Type.ADD) {
e = new Entry(type, path);
}
this.entries.put(path, e);
}
public Map<String, Entry> getEntries() {
return this.entries;
}
public static class Entry {
public final Type type;
public final String path;
public Entry(Type type, String path) {
this.type = type;
this.path = path;
}
public String toString() {
return (Object)((Object)this.type) + " " + this.path;
}
}
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
public static enum Type {
ADD,
DELETE,
UPDATE,
MKDIR,
RMDIR,
NOP;
private Type() {
}
}
}