MCPcopy Create free account
hub / github.com/badvision/jace / addItems

Method addItems

src/main/java/jace/library/TocTreeModel.java:43–61  ·  view source on GitHub ↗
(String parent, final String sub, Set<Long> entries)

Source from the content-addressed store, hash-verified

41 };
42
43 public void addItems(String parent, final String sub, Set<Long> entries) {
44 if (entries == null || entries.isEmpty()) return;
45 Map<String, Set<Long>> parentNode = tree.get(parent);
46 if (parentNode == null) {
47 parentNode = new TreeMap<String, Set<Long>>();
48 tree.put(parent, parentNode);
49 }
50 Set<Long> allEntries = parentNode.get(sub);
51 if (allEntries == null) {
52 allEntries = new TreeSet<Long>() {
53 @Override
54 public String toString() {
55 return sub;
56 }
57 };
58 parentNode.put(sub, allEntries);
59 }
60 allEntries.addAll(entries);
61 }
62
63 public Object getRoot() {
64 return tree;

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected