-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBluePackage.java
More file actions
44 lines (34 loc) · 1.26 KB
/
BluePackage.java
File metadata and controls
44 lines (34 loc) · 1.26 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
package blue.contract.packager.model;
import blue.language.model.Node;
import java.util.HashMap;
import java.util.Map;
public class BluePackage {
private final String directoryName;
private final Node packageContent;
private final Map<String, String> mappings; // Changed to final
private final Map<String, Node> preprocessedNodes; // Changed to final
public BluePackage(String directoryName, Node packageContent) {
this.directoryName = directoryName;
this.packageContent = packageContent;
this.mappings = new HashMap<>();
this.preprocessedNodes = new HashMap<>();
}
public String getDirectoryName() {
return directoryName;
}
public Node getPackageContent() {
return packageContent;
}
public Map<String, String> getMappings() {
return mappings; // Return direct reference instead of copy
}
public Map<String, Node> getPreprocessedNodes() {
return preprocessedNodes; // Return direct reference instead of copy
}
public void addMapping(String nodeName, String blueId) {
this.mappings.put(nodeName, blueId);
}
public void addPreprocessedNode(String nodeName, Node node) {
this.preprocessedNodes.put(nodeName, node);
}
}