Autopsy  4.10.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 int hashCode() {
59  int hash = 7;
60  hash = 37 * hash + Objects.hashCode(this.hashSetName);
61  hash = 37 * hash + (int) (this.hashSetID ^ (this.hashSetID >>> 32));
62  return hash;
63  }
64 
65  @Override
66  public boolean equals(Object obj) {
67  if (obj == null) {
68  return false;
69  }
70  if (getClass() != obj.getClass()) {
71  return false;
72  }
73  final HashSetFilter other = (HashSetFilter) obj;
74  if (!Objects.equals(this.hashSetName, other.hashSetName)) {
75  return false;
76  }
77  if (this.hashSetID != other.hashSetID) {
78  return false;
79  }
80  return isSelected() == other.isSelected();
81  }
82 }
HashSetFilter(String hashSetName, long hashSetID)

Copyright © 2012-2018 Basis Technology. Generated on: Fri Mar 22 2019
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.