19 package org.sleuthkit.autopsy.timeline.ui.detailview.tree;
21 import java.util.Comparator;
22 import java.util.HashMap;
23 import java.util.List;
25 import javafx.scene.control.TreeItem;
36 private final Map<String, DescriptionTreeItem>
childMap =
new HashMap<>();
50 public void insert(List<TimeLineEvent> path) {
52 DescriptionTreeItem treeItem = childMap.computeIfAbsent(head.
getDescription(),
53 description -> configureNewTreeItem(
new DescriptionTreeItem(head, getComparator()))
57 if (path.isEmpty() ==
false) {
58 treeItem.insert(path);
63 void remove(List<TimeLineEvent> path) {
65 DescriptionTreeItem descTreeItem = childMap.get(head.
getDescription());
68 if (descTreeItem != null) {
69 if (path.isEmpty() ==
false) {
70 descTreeItem.remove(path);
74 if (descTreeItem.getChildren().isEmpty()) {
76 getChildren().remove(descTreeItem);
void insert(List< TimeLineEvent > path)
final Map< String, DescriptionTreeItem > childMap