BrightSide Workbench Full Report + Source Code
RelatedPathsPK.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2012 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 package org.turro.contacts;
19 
24 public class RelatedPathsPK implements java.io.Serializable {
25 
26  private String origin;
27 
28  private String destination;
29 
30  public String getDestination() {
31  return destination;
32  }
33 
34  public void setDestination(String destination) {
35  this.destination = destination;
36  }
37 
38  public String getOrigin() {
39  return origin;
40  }
41 
42  public void setOrigin(String origin) {
43  this.origin = origin;
44  }
45 
46  @Override
47  public boolean equals(Object obj) {
48  if (obj == null) {
49  return false;
50  }
51  if (getClass() != obj.getClass()) {
52  return false;
53  }
54  final RelatedPathsPK other = (RelatedPathsPK) obj;
55  if ((this.origin == null) ? (other.origin != null) : !this.origin.equals(other.origin)) {
56  return false;
57  }
58  if ((this.destination == null) ? (other.destination != null) : !this.destination.equals(other.destination)) {
59  return false;
60  }
61  return true;
62  }
63 
64  @Override
65  public int hashCode() {
66  int hash = 7;
67  hash = 43 * hash + (this.origin != null ? this.origin.hashCode() : 0);
68  hash = 43 * hash + (this.destination != null ? this.destination.hashCode() : 0);
69  return hash;
70  }
71 
72 }
void setDestination(String destination)