19 package org.sleuthkit.autopsy.timeline.ui.detailview.tree;
21 import java.util.Comparator;
22 import javafx.scene.control.TreeItem;
23 import org.openide.util.NbBundle;
27 @NbBundle.Messages({
"TreeComparator.Description.displayName=Description",
28 "TreeComparator.Count.displayName=Count",
29 "TreeComparator.Type.displayName=Type"})
30 enum TreeComparator implements Comparator<TreeItem<
EventBundle<?>>> {
32 Description(Bundle.TreeComparator_Description_displayName()) {
35 return o1.getValue().
getDescription().compareTo(o2.getValue().getDescription());
38 Count(Bundle.TreeComparator_Count_displayName()) {
41 return Long.compare(o2.getValue().getCount(), o1.getValue().getCount());
44 Type(Bundle.TreeComparator_Type_displayName()) {
47 return EventType.getComparator().compare(o1.getValue().getEventType(), o2.getValue().getEventType());
51 private final String displayName;
53 private TreeComparator(String displayName) {
54 this.displayName = displayName;
57 public String getDisplayName() {