Sleuth Kit Java Bindings (JNI) 4.14.0
Java bindings for using The Sleuth Kit
Loading...
Searching...
No Matches
AccountPair.java
Go to the documentation of this file.
1/*
2 * SleuthKit Java Bindings
3 *
4 * Copyright 2018 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 */
19package org.sleuthkit.datamodel;
20
26public final class AccountPair {
27
28 private final AccountDeviceInstance account1;
29 private final AccountDeviceInstance account2;
30
38 return account1;
39 }
40
48 return account2;
49 }
50
52 this.account1 = account1;
53 this.account2 = account2;
54 }
55
56 @Override
57 public int hashCode() {
58 return account1.hashCode() + account2.hashCode();
59 }
60
61 @Override
62 public boolean equals(Object other) {
63 if (other == this) {
64 return true;
65 }
66 if (!(other instanceof AccountPair)) {
67 return false;
68 }
69 AccountPair otherPair = (AccountPair) other;
70 return (account1.equals(otherPair.account1) && account2.equals(otherPair.account2))
71 || (account1.equals(otherPair.account2) && account2.equals(otherPair.account1));
72 }
73}
AccountDeviceInstance getFirst()
AccountDeviceInstance getSecond()

Copyright © 2011-2024 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.