19 package org.sleuthkit.autopsy.discovery.search;
21 import java.text.SimpleDateFormat;
22 import java.util.Collections;
23 import java.util.Date;
24 import java.util.List;
25 import java.util.Locale;
26 import java.util.Objects;
27 import java.util.concurrent.TimeUnit;
28 import java.util.logging.Level;
29 import org.openide.util.NbBundle;
47 static class SearchKey
implements Comparable<SearchKey> {
49 private final String keyString;
53 private final List<AbstractFilter> filters;
54 private final SleuthkitCase sleuthkitCase;
68 SearchKey(String userName, List<AbstractFilter> filters,
73 this.groupAttributeType = groupAttributeType;
74 this.groupSortingType = groupSortingType;
75 this.sortingMethod = sortingMethod;
76 this.filters = filters;
78 StringBuilder searchStringBuilder =
new StringBuilder();
79 searchStringBuilder.append(userName);
81 searchStringBuilder.append(filter.toString());
83 searchStringBuilder.append(groupAttributeType).append(groupSortingType).append(sortingMethod);
84 keyString = searchStringBuilder.toString();
85 this.sleuthkitCase = sleuthkitCase;
86 this.centralRepository = centralRepository;
99 SearchKey(String userName, List<AbstractFilter> filters,
103 this(userName, filters, groupAttributeType, groupSortingType,
104 sortingMethod, null, null);
108 public int compareTo(SearchKey otherSearchKey) {
109 return getKeyString().compareTo(otherSearchKey.getKeyString());
113 public boolean equals(Object otherKey) {
114 if (otherKey ==
this) {
118 if (!(otherKey instanceof SearchKey)) {
122 SearchKey otherSearchKey = (SearchKey) otherKey;
123 if (this.sleuthkitCase != otherSearchKey.getSleuthkitCase()
124 || this.centralRepository != otherSearchKey.getCentralRepository()) {
128 return getKeyString().equals(otherSearchKey.getKeyString());
132 public int hashCode() {
134 hash = 79 * hash + Objects.hashCode(getKeyString());
143 String getKeyString() {
152 List<AbstractFilter> getFilters() {
153 return Collections.unmodifiableList(this.filters);
162 return groupSortingType;
171 return groupAttributeType;
180 return sortingMethod;
188 SleuthkitCase getSleuthkitCase() {
189 return this.sleuthkitCase;
198 return this.centralRepository;
205 public abstract static class GroupKey implements Comparable<GroupKey> {
213 abstract String getDisplayName();
223 abstract public boolean equals(Object otherKey);
242 int compareClassNames(
GroupKey otherGroupKey) {
243 return this.getClass().getName().compareTo(otherGroupKey.getClass().getName());
248 return getDisplayName();
255 static class FileSizeGroupKey
extends GroupKey {
264 FileSizeGroupKey(
Result file) {
274 String getDisplayName() {
275 return getFileSize().toString();
279 public int compareTo(GroupKey otherGroupKey) {
280 if (otherGroupKey instanceof FileSizeGroupKey) {
281 FileSizeGroupKey otherFileSizeGroupKey = (FileSizeGroupKey) otherGroupKey;
282 return Integer.compare(getFileSize().getRanking(), otherFileSizeGroupKey.getFileSize().getRanking());
284 return compareClassNames(otherGroupKey);
289 public boolean equals(Object otherKey) {
290 if (otherKey ==
this) {
294 if (!(otherKey instanceof FileSizeGroupKey)) {
298 FileSizeGroupKey otherFileSizeGroupKey = (FileSizeGroupKey) otherKey;
299 return getFileSize().equals(otherFileSizeGroupKey.getFileSize());
303 public int hashCode() {
304 return Objects.hash(getFileSize().getRanking());
312 SearchData.FileSize getFileSize() {
320 static class FileTypeGroupKey
extends GroupKey {
322 private final SearchData.Type fileType;
329 FileTypeGroupKey(Result file) {
330 fileType = ((ResultFile) file).getFileType();
334 String getDisplayName() {
335 return getFileType().toString();
339 public int compareTo(GroupKey otherGroupKey) {
340 if (otherGroupKey instanceof FileTypeGroupKey) {
341 FileTypeGroupKey otherFileTypeGroupKey = (FileTypeGroupKey) otherGroupKey;
342 return Integer.compare(getFileType().getRanking(), otherFileTypeGroupKey.getFileType().getRanking());
344 return compareClassNames(otherGroupKey);
349 public boolean equals(Object otherKey) {
350 if (otherKey ==
this) {
354 if (!(otherKey instanceof FileTypeGroupKey)) {
358 FileTypeGroupKey otherFileTypeGroupKey = (FileTypeGroupKey) otherKey;
359 return getFileType().equals(otherFileTypeGroupKey.getFileType());
363 public int hashCode() {
364 return Objects.hash(getFileType().getRanking());
372 SearchData.Type getFileType() {
380 static class KeywordListGroupKey
extends GroupKey {
382 private final List<String> keywordListNames;
383 private final String keywordListNamesString;
391 "DiscoveryKeyUtils.KeywordListGroupKey.noKeywords=None"})
392 KeywordListGroupKey(ResultFile file) {
393 keywordListNames = file.getKeywordListNames();
394 if (keywordListNames.isEmpty()) {
395 keywordListNamesString = Bundle.DiscoveryKeyUtils_KeywordListGroupKey_noKeywords();
397 keywordListNamesString = String.join(
",", keywordListNames);
402 String getDisplayName() {
403 return getKeywordListNamesString();
407 public int compareTo(GroupKey otherGroupKey) {
408 if (otherGroupKey instanceof KeywordListGroupKey) {
409 KeywordListGroupKey otherKeywordListNamesGroupKey = (KeywordListGroupKey) otherGroupKey;
412 if (getKeywordListNames().isEmpty()) {
413 if (otherKeywordListNamesGroupKey.getKeywordListNames().isEmpty()) {
418 }
else if (otherKeywordListNamesGroupKey.getKeywordListNames().isEmpty()) {
422 return getKeywordListNamesString().compareTo(otherKeywordListNamesGroupKey.getKeywordListNamesString());
424 return compareClassNames(otherGroupKey);
429 public boolean equals(Object otherKey) {
430 if (otherKey ==
this) {
434 if (!(otherKey instanceof KeywordListGroupKey)) {
438 KeywordListGroupKey otherKeywordListGroupKey = (KeywordListGroupKey) otherKey;
439 return getKeywordListNamesString().equals(otherKeywordListGroupKey.getKeywordListNamesString());
443 public int hashCode() {
444 return Objects.hash(getKeywordListNamesString());
452 List<String> getKeywordListNames() {
453 return Collections.unmodifiableList(keywordListNames);
463 String getKeywordListNamesString() {
464 return keywordListNamesString;
471 static class FileTagGroupKey
extends GroupKey {
473 private final List<String> tagNames;
474 private final String tagNamesString;
482 "DiscoveryKeyUtils.FileTagGroupKey.noSets=None"})
483 FileTagGroupKey(ResultFile file) {
484 tagNames = file.getTagNames();
486 if (tagNames.isEmpty()) {
487 tagNamesString = Bundle.DiscoveryKeyUtils_FileTagGroupKey_noSets();
489 tagNamesString = String.join(
",", tagNames);
494 String getDisplayName() {
495 return getTagNamesString();
499 public int compareTo(GroupKey otherGroupKey) {
500 if (otherGroupKey instanceof FileTagGroupKey) {
501 FileTagGroupKey otherFileTagGroupKey = (FileTagGroupKey) otherGroupKey;
504 if (getTagNames().isEmpty()) {
505 if (otherFileTagGroupKey.getTagNames().isEmpty()) {
510 }
else if (otherFileTagGroupKey.getTagNames().isEmpty()) {
514 return getTagNamesString().compareTo(otherFileTagGroupKey.getTagNamesString());
516 return compareClassNames(otherGroupKey);
521 public boolean equals(Object otherKey) {
522 if (otherKey ==
this) {
525 if (!(otherKey instanceof FileTagGroupKey)) {
528 FileTagGroupKey otherFileTagGroupKey = (FileTagGroupKey) otherKey;
529 return getTagNamesString().equals(otherFileTagGroupKey.getTagNamesString());
533 public int hashCode() {
534 return Objects.hash(getTagNamesString());
542 List<String> getTagNames() {
543 return Collections.unmodifiableList(tagNames);
553 String getTagNamesString() {
554 return tagNamesString;
561 static class ParentPathGroupKey
extends GroupKey {
563 private String parentPath;
564 private Long parentID;
571 ParentPathGroupKey(ResultFile file) {
574 parent = file.getFirstInstance().getParent();
575 }
catch (TskCoreException ignored) {
579 while (parent != null && parent instanceof AbstractFile && ((AbstractFile) parent).isFile()) {
581 parent = parent.getParent();
582 }
catch (TskCoreException ignored) {
586 setParentPathAndID(parent, file);
595 private void setParentPathAndID(Content parent, ResultFile file) {
596 if (parent != null) {
598 parentPath = parent.getUniquePath();
599 parentID = parent.getId();
600 }
catch (TskCoreException ignored) {
605 if (parentPath == null) {
606 if (file.getFirstInstance().getParentPath() != null) {
607 parentPath = file.getFirstInstance().getParentPath();
616 String getDisplayName() {
617 return getParentPath();
621 public int compareTo(GroupKey otherGroupKey) {
622 if (otherGroupKey instanceof ParentPathGroupKey) {
623 ParentPathGroupKey otherParentPathGroupKey = (ParentPathGroupKey) otherGroupKey;
624 int comparisonResult = getParentPath().compareTo(otherParentPathGroupKey.getParentPath());
625 if (comparisonResult == 0) {
626 comparisonResult = getParentID().compareTo(otherParentPathGroupKey.getParentID());
628 return comparisonResult;
630 return compareClassNames(otherGroupKey);
635 public boolean equals(Object otherKey) {
636 if (otherKey ==
this) {
640 if (!(otherKey instanceof ParentPathGroupKey)) {
644 ParentPathGroupKey otherParentPathGroupKey = (ParentPathGroupKey) otherKey;
645 return getParentPath().equals(otherParentPathGroupKey.getParentPath()) && getParentID().equals(otherParentPathGroupKey.getParentID());
649 public int hashCode() {
651 hashCode = 61 * hashCode + Objects.hash(getParentPath());
652 hashCode = 61 * hashCode + Objects.hash(getParentID());
661 String getParentPath() {
678 static class DataSourceGroupKey
extends GroupKey {
680 private final long dataSourceID;
681 private String displayName;
689 "# {0} - Data source name",
690 "# {1} - Data source ID",
691 "DiscoveryKeyUtils.DataSourceGroupKey.datasourceAndID={0}(ID: {1})",
692 "# {0} - Data source ID",
693 "DiscoveryKeyUtils.DataSourceGroupKey.idOnly=Data source (ID: {0})"})
694 DataSourceGroupKey(Result result) {
696 dataSourceID = result.getDataSourceObjectId();
699 Content ds = result.getDataSource();
700 displayName = Bundle.DiscoveryKeyUtils_DataSourceGroupKey_datasourceAndID(ds.getName(), ds.getId());
701 }
catch (TskCoreException ex) {
702 logger.log(Level.WARNING,
"Error looking up data source with ID " + dataSourceID, ex);
703 displayName = Bundle.DiscoveryKeyUtils_DataSourceGroupKey_idOnly(dataSourceID);
708 String getDisplayName() {
713 public int compareTo(GroupKey otherGroupKey) {
714 if (otherGroupKey instanceof DataSourceGroupKey) {
715 DataSourceGroupKey otherDataSourceGroupKey = (DataSourceGroupKey) otherGroupKey;
716 return Long.compare(getDataSourceID(), otherDataSourceGroupKey.getDataSourceID());
718 return compareClassNames(otherGroupKey);
723 public boolean equals(Object otherKey) {
724 if (otherKey ==
this) {
728 if (!(otherKey instanceof DataSourceGroupKey)) {
732 DataSourceGroupKey otherDataSourceGroupKey = (DataSourceGroupKey) otherKey;
733 return getDataSourceID() == otherDataSourceGroupKey.getDataSourceID();
737 public int hashCode() {
738 return Objects.hash(getDataSourceID());
746 long getDataSourceID() {
755 static class NoGroupingGroupKey
extends GroupKey {
760 NoGroupingGroupKey() {
765 "DiscoveryKeyUtils.NoGroupingGroupKey.allFiles=All Files"})
767 String getDisplayName() {
768 return Bundle.DiscoveryKeyUtils_NoGroupingGroupKey_allFiles();
772 public int compareTo(GroupKey otherGroupKey) {
774 if (otherGroupKey instanceof NoGroupingGroupKey) {
777 return compareClassNames(otherGroupKey);
782 public boolean equals(Object otherKey) {
783 if (otherKey ==
this) {
787 return otherKey instanceof NoGroupingGroupKey;
791 public int hashCode() {
799 static class FrequencyGroupKey
extends GroupKey {
801 private final SearchData.Frequency frequency;
808 FrequencyGroupKey(Result result) {
809 frequency = result.getFrequency();
813 String getDisplayName() {
814 return getFrequency().toString();
818 public int compareTo(GroupKey otherGroupKey) {
819 if (otherGroupKey instanceof FrequencyGroupKey) {
820 FrequencyGroupKey otherFrequencyGroupKey = (FrequencyGroupKey) otherGroupKey;
821 return Integer.compare(getFrequency().getRanking(), otherFrequencyGroupKey.getFrequency().getRanking());
823 return compareClassNames(otherGroupKey);
828 public boolean equals(Object otherKey) {
829 if (otherKey ==
this) {
833 if (!(otherKey instanceof FrequencyGroupKey)) {
837 FrequencyGroupKey otherFrequencyGroupKey = (FrequencyGroupKey) otherKey;
838 return getFrequency().equals(otherFrequencyGroupKey.getFrequency());
842 public int hashCode() {
843 return Objects.hash(getFrequency().getRanking());
851 SearchData.Frequency getFrequency() {
859 static class HashHitsGroupKey
extends GroupKey {
861 private final List<String> hashSetNames;
862 private final String hashSetNamesString;
870 "DiscoveryKeyUtils.HashHitsGroupKey.noHashHits=None"})
871 HashHitsGroupKey(ResultFile file) {
872 hashSetNames = file.getHashSetNames();
874 if (hashSetNames.isEmpty()) {
875 hashSetNamesString = Bundle.DiscoveryKeyUtils_HashHitsGroupKey_noHashHits();
877 hashSetNamesString = String.join(
",", hashSetNames);
882 String getDisplayName() {
883 return getHashSetNamesString();
887 public int compareTo(GroupKey otherGroupKey) {
888 if (otherGroupKey instanceof HashHitsGroupKey) {
889 HashHitsGroupKey otherHashHitsGroupKey = (HashHitsGroupKey) otherGroupKey;
892 if (getHashSetNames().isEmpty()) {
893 if (otherHashHitsGroupKey.getHashSetNames().isEmpty()) {
898 }
else if (otherHashHitsGroupKey.getHashSetNames().isEmpty()) {
902 return getHashSetNamesString().compareTo(otherHashHitsGroupKey.getHashSetNamesString());
904 return compareClassNames(otherGroupKey);
909 public boolean equals(Object otherKey) {
910 if (otherKey ==
this) {
914 if (!(otherKey instanceof HashHitsGroupKey)) {
918 HashHitsGroupKey otherHashHitsGroupKey = (HashHitsGroupKey) otherKey;
919 return getHashSetNamesString().equals(otherHashHitsGroupKey.getHashSetNamesString());
923 public int hashCode() {
924 return Objects.hash(getHashSetNamesString());
932 List<String> getHashSetNames() {
933 return Collections.unmodifiableList(hashSetNames);
941 String getHashSetNamesString() {
942 return hashSetNamesString;
949 static class InterestingItemGroupKey
extends GroupKey {
951 private final List<String> interestingItemSetNames;
952 private final String interestingItemSetNamesString;
960 "DiscoveryKeyUtils.InterestingItemGroupKey.noSets=None"})
961 InterestingItemGroupKey(ResultFile file) {
962 interestingItemSetNames = file.getInterestingSetNames();
964 if (interestingItemSetNames.isEmpty()) {
965 interestingItemSetNamesString = Bundle.DiscoveryKeyUtils_InterestingItemGroupKey_noSets();
967 interestingItemSetNamesString = String.join(
",", interestingItemSetNames);
972 String getDisplayName() {
973 return getInterestingItemSetNamesString();
977 public int compareTo(GroupKey otherGroupKey) {
978 if (otherGroupKey instanceof InterestingItemGroupKey) {
979 InterestingItemGroupKey otherInterestingItemGroupKey = (InterestingItemGroupKey) otherGroupKey;
982 if (this.getInterestingItemSetNames().isEmpty()) {
983 if (otherInterestingItemGroupKey.getInterestingItemSetNames().isEmpty()) {
988 }
else if (otherInterestingItemGroupKey.getInterestingItemSetNames().isEmpty()) {
992 return getInterestingItemSetNamesString().compareTo(otherInterestingItemGroupKey.getInterestingItemSetNamesString());
994 return compareClassNames(otherGroupKey);
999 public boolean equals(Object otherKey) {
1000 if (otherKey ==
this) {
1004 if (!(otherKey instanceof InterestingItemGroupKey)) {
1008 InterestingItemGroupKey otherInterestingItemGroupKey = (InterestingItemGroupKey) otherKey;
1009 return getInterestingItemSetNamesString().equals(otherInterestingItemGroupKey.getInterestingItemSetNamesString());
1013 public int hashCode() {
1014 return Objects.hash(getInterestingItemSetNamesString());
1022 List<String> getInterestingItemSetNames() {
1023 return Collections.unmodifiableList(interestingItemSetNames);
1033 String getInterestingItemSetNamesString() {
1034 return interestingItemSetNamesString;
1041 static class MostRecentActivityDateGroupKey
extends GroupKey {
1043 private final Long epochDate;
1044 private final String dateNameString;
1051 @NbBundle.Messages({
1052 "DiscoveryKeyUtils.MostRecentActivityDateGroupKey.noDate=No Date Available"})
1053 MostRecentActivityDateGroupKey(Result result) {
1054 if (result instanceof ResultDomain) {
1055 epochDate = ((ResultDomain) result).getActivityEnd();
1056 dateNameString =
new SimpleDateFormat(
"yyyy/MM/dd", Locale.getDefault()).format(
new Date(TimeUnit.SECONDS.toMillis(epochDate)));
1058 epochDate = Long.MAX_VALUE;
1059 dateNameString = Bundle.DiscoveryKeyUtils_MostRecentActivityDateGroupKey_noDate();
1064 String getDisplayName() {
1065 return getDateNameString();
1069 public boolean equals(Object otherKey) {
1070 if (otherKey ==
this) {
1074 if (!(otherKey instanceof MostRecentActivityDateGroupKey)) {
1078 MostRecentActivityDateGroupKey dateGroupKey = (MostRecentActivityDateGroupKey) otherKey;
1079 return getDateNameString().equals(dateGroupKey.getDateNameString());
1083 public int hashCode() {
1084 return Objects.hash(getDateNameString());
1088 public int compareTo(GroupKey otherGroupKey) {
1089 if (otherGroupKey instanceof MostRecentActivityDateGroupKey) {
1090 MostRecentActivityDateGroupKey otherDateGroupKey = (MostRecentActivityDateGroupKey) otherGroupKey;
1093 if (this.getEpochDate().equals(Long.MAX_VALUE)) {
1094 if (otherDateGroupKey.getEpochDate().equals(Long.MAX_VALUE)) {
1099 }
else if (otherDateGroupKey.getEpochDate().equals(Long.MAX_VALUE)) {
1103 return getDateNameString().compareTo(otherDateGroupKey.getDateNameString());
1105 return compareClassNames(otherGroupKey);
1114 Long getEpochDate() {
1123 String getDateNameString() {
1124 return dateNameString;
1131 static class FirstActivityDateGroupKey
extends GroupKey {
1133 private final Long epochDate;
1134 private final String dateNameString;
1141 @NbBundle.Messages({
1142 "DiscoveryKeyUtils.FirstActivityDateGroupKey.noDate=No Date Available"})
1143 FirstActivityDateGroupKey(Result result) {
1144 if (result instanceof ResultDomain) {
1145 epochDate = ((ResultDomain) result).getActivityStart();
1146 dateNameString =
new SimpleDateFormat(
"yyyy/MM/dd", Locale.getDefault()).format(
new Date(TimeUnit.SECONDS.toMillis(epochDate)));
1148 epochDate = Long.MAX_VALUE;
1149 dateNameString = Bundle.DiscoveryKeyUtils_FirstActivityDateGroupKey_noDate();
1154 String getDisplayName() {
1155 return getDateNameString();
1159 public boolean equals(Object otherKey) {
1160 if (otherKey ==
this) {
1164 if (!(otherKey instanceof FirstActivityDateGroupKey)) {
1168 FirstActivityDateGroupKey dateGroupKey = (FirstActivityDateGroupKey) otherKey;
1169 return getDateNameString().equals(dateGroupKey.getDateNameString());
1173 public int hashCode() {
1174 return Objects.hash(getDateNameString());
1178 public int compareTo(GroupKey otherGroupKey) {
1179 if (otherGroupKey instanceof FirstActivityDateGroupKey) {
1180 FirstActivityDateGroupKey otherDateGroupKey = (FirstActivityDateGroupKey) otherGroupKey;
1183 if (this.getEpochDate().equals(Long.MAX_VALUE)) {
1184 if (otherDateGroupKey.getEpochDate().equals(Long.MAX_VALUE)) {
1189 }
else if (otherDateGroupKey.getEpochDate().equals(Long.MAX_VALUE)) {
1193 return getDateNameString().compareTo(otherDateGroupKey.getDateNameString());
1195 return compareClassNames(otherGroupKey);
1204 Long getEpochDate() {
1213 String getDateNameString() {
1214 return dateNameString;
1221 static class NumberOfVisitsGroupKey
extends GroupKey {
1223 private final String displayName;
1224 private final Long visits;
1231 @NbBundle.Messages({
1232 "# {0} - totalVisits",
1233 "DiscoveryKeyUtils.NumberOfVisitsGroupKey.displayName={0} visits",
1234 "DiscoveryKeyUtils.NumberOfVisitsGroupKey.noVisits=No visits"})
1235 NumberOfVisitsGroupKey(Result result) {
1236 if (result instanceof ResultDomain) {
1237 Long totalVisits = ((ResultDomain) result).getTotalVisits();
1238 if (totalVisits == null) {
1241 visits = totalVisits;
1242 displayName = Bundle.DiscoveryKeyUtils_NumberOfVisitsGroupKey_displayName(Long.toString(visits));
1244 displayName = Bundle.DiscoveryKeyUtils_NumberOfVisitsGroupKey_noVisits();
1250 String getDisplayName() {
1255 public int hashCode() {
1256 return Objects.hash(displayName);
1269 public boolean equals(Object otherKey) {
1270 if (otherKey ==
this) {
1274 if (!(otherKey instanceof NumberOfVisitsGroupKey)) {
1278 NumberOfVisitsGroupKey visitsKey = (NumberOfVisitsGroupKey) otherKey;
1279 return visits.equals(visitsKey.getVisits());
1283 public int compareTo(GroupKey otherGroupKey) {
1284 if (otherGroupKey instanceof NumberOfVisitsGroupKey) {
1285 NumberOfVisitsGroupKey visitsKey = (NumberOfVisitsGroupKey) otherGroupKey;
1286 return Long.compare(getVisits(), visitsKey.getVisits());
1288 return compareClassNames(otherGroupKey);
1296 static class ObjectDetectedGroupKey
extends GroupKey {
1298 private final List<String> objectDetectedNames;
1299 private final String objectDetectedNamesString;
1306 @NbBundle.Messages({
1307 "DiscoveryKeyUtils.ObjectDetectedGroupKey.noSets=None"})
1308 ObjectDetectedGroupKey(ResultFile file) {
1309 objectDetectedNames = file.getObjectDetectedNames();
1310 if (objectDetectedNames.isEmpty()) {
1311 objectDetectedNamesString = Bundle.DiscoveryKeyUtils_ObjectDetectedGroupKey_noSets();
1313 objectDetectedNamesString = String.join(
",", objectDetectedNames);
1318 String getDisplayName() {
1319 return getObjectDetectedNamesString();
1323 public int compareTo(GroupKey otherGroupKey) {
1324 if (otherGroupKey instanceof ObjectDetectedGroupKey) {
1325 ObjectDetectedGroupKey otherObjectDetectedGroupKey = (ObjectDetectedGroupKey) otherGroupKey;
1328 if (this.getObjectDetectedNames().isEmpty()) {
1329 if (otherObjectDetectedGroupKey.getObjectDetectedNames().isEmpty()) {
1334 }
else if (otherObjectDetectedGroupKey.getObjectDetectedNames().isEmpty()) {
1338 return getObjectDetectedNamesString().compareTo(otherObjectDetectedGroupKey.getObjectDetectedNamesString());
1340 return compareClassNames(otherGroupKey);
1345 public boolean equals(Object otherKey) {
1346 if (otherKey ==
this) {
1350 if (!(otherKey instanceof ObjectDetectedGroupKey)) {
1354 ObjectDetectedGroupKey otherObjectDetectedGroupKey = (ObjectDetectedGroupKey) otherKey;
1355 return getObjectDetectedNamesString().equals(otherObjectDetectedGroupKey.getObjectDetectedNamesString());
1359 public int hashCode() {
1360 return Objects.hash(getObjectDetectedNamesString());
1368 List<String> getObjectDetectedNames() {
1369 return Collections.unmodifiableList(objectDetectedNames);
1379 String getObjectDetectedNamesString() {
1380 return objectDetectedNamesString;
static final Logger logger
static FileSize fromVideoSize(long size)
abstract boolean equals(Object otherKey)
AbstractFile getFirstInstance()
FileSize(int ranking, long minB, long maxB, String displayName, String displaySize)
synchronized static Logger getLogger(String name)