1
|
1 package cl.maps.utils;
|
|
2
|
|
3 import org.apache.commons.lang.StringUtils;
|
|
4
|
|
5 public class AttKey{
|
|
6 private String oc;
|
|
7 private String attName;
|
|
8
|
|
9 public AttKey(String oc, String attName){
|
|
10 this.oc = oc;
|
|
11 this.attName = attName;
|
|
12 }
|
|
13
|
|
14 public String getOc() {
|
|
15 return oc;
|
|
16 }
|
|
17
|
|
18 public void setOc(String oc) {
|
|
19 this.oc = oc;
|
|
20 }
|
|
21
|
|
22 public String getAttName() {
|
|
23 return attName;
|
|
24 }
|
|
25
|
|
26 public void setAttName(String attName) {
|
|
27 this.attName = attName;
|
|
28 }
|
|
29
|
|
30 @Override
|
|
31 public int hashCode() {
|
|
32 String s = this.oc + this.attName;
|
|
33 return s.hashCode();
|
|
34 }
|
|
35
|
|
36 @Override
|
|
37 public boolean equals(Object o){
|
|
38 if(o instanceof AttKey){
|
|
39 AttKey other = (AttKey)o;
|
|
40 if(StringUtils.equals(oc, other.oc) &&
|
|
41 StringUtils.equals(attName, other.attName)){
|
|
42 return true;
|
|
43 }
|
|
44 }
|
|
45 return false;
|
|
46 }
|
|
47
|
|
48 @Override
|
|
49 public String toString(){
|
|
50 return "AttKey [" + oc + ", " + attName + "]";
|
|
51 }
|
|
52
|
|
53 }
|