Autopsy  4.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
HashSetFilter.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2015 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.timeline.filters;
20 
21 import java.util.Objects;
22 
26 public class HashSetFilter extends AbstractFilter {
27 
28  private final String hashSetName;
29  private final long hashSetID;
30 
31  public long getHashSetID() {
32  return hashSetID;
33  }
34 
35  public String getHashSetName() {
36  return hashSetName;
37  }
38 
39  public HashSetFilter(String hashSetName, long hashSetID) {
40  this.hashSetName = hashSetName;
41  this.hashSetID = hashSetID;
42  }
43 
44  @Override
45  synchronized public HashSetFilter copyOf() {
47  filterCopy.setSelected(isSelected());
48  filterCopy.setDisabled(isDisabled());
49  return filterCopy;
50  }
51 
52  @Override
53  public String getDisplayName() {
54  return hashSetName;
55  }
56 
57  @Override
58  public String getHTMLReportString() {
59  return getDisplayName() + getStringCheckBox();
60  }
61 
62  @Override
63  public int hashCode() {
64  int hash = 7;
65  hash = 37 * hash + Objects.hashCode(this.hashSetName);
66  hash = 37 * hash + (int) (this.hashSetID ^ (this.hashSetID >>> 32));
67  return hash;
68  }
69 
70  @Override
71  public boolean equals(Object obj) {
72  if (obj == null) {
73  return false;
74  }
75  if (getClass() != obj.getClass()) {
76  return false;
77  }
78  final HashSetFilter other = (HashSetFilter) obj;
79  if (!Objects.equals(this.hashSetName, other.hashSetName)) {
80  return false;
81  }
82  if (this.hashSetID != other.hashSetID) {
83  return false;
84  }
85  return isSelected() == other.isSelected();
86  }
87 
88 }
HashSetFilter(String hashSetName, long hashSetID)

Copyright © 2012-2015 Basis Technology. Generated on: Wed Apr 6 2016
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.