19 package org.sleuthkit.datamodel;
21 import java.io.Serializable;
22 import java.util.HashMap;
23 import java.util.Objects;
30 public class TagName implements Comparable<TagName>, Serializable {
32 private static final long serialVersionUID = 1L;
41 RED(
"Red",
"#FF0000"),
53 private final static HashMap<String, HTML_COLOR> colorMap =
new HashMap<String, HTML_COLOR>();
54 private final String name;
55 private final String hexString;
59 colorMap.put(color.
getName(), color);
64 this.hexString = hexString;
77 if (colorMap.containsKey(colorName)) {
78 return colorMap.get(colorName);
84 private final long id;
85 private final String displayName;
86 private final String description;
87 private final HTML_COLOR color;
89 private final long tagSetId;
90 private final int rank;
93 TagName(
long id, String displayName, String description, HTML_COLOR color,
TskData.
FileKnown knownStatus,
long tagSetId,
int rank) {
95 this.displayName = displayName;
96 this.description = description;
98 this.knownStatus = knownStatus;
99 this.tagSetId = tagSetId;
146 hash = 89 * hash + (int) (this.
id ^ (this.
id >>> 32));
147 hash = 89 * hash + (this.displayName != null ? this.displayName.hashCode() : 0);
148 hash = 89 * hash + (this.description != null ? this.description.hashCode() : 0);
149 hash = 89 * hash + (this.color != null ? this.color.hashCode() : 0);
150 hash = 89 * hash + (this.knownStatus != null ? this.knownStatus.hashCode() : 0);
151 hash = 89 * hash + (int) (this.
id ^ (this.tagSetId >>> 32));
160 if (getClass() != obj.getClass()) {
164 return (this.
id == other.
getId()
167 && Objects.equals(
this.color, other.
getColor())
169 && this.tagSetId == other.getTagSetId());
HTML_COLOR(String name, String hexString)
int compareTo(TagName other)
TskData.FileKnown getKnownStatus()
static HTML_COLOR getColorByName(String colorName)
boolean equals(Object obj)