1 23 24 package com.rift.coad.lib.bean.test; 25 26 31 public class TestKey implements java.io.Serializable { 32 33 private String key1 = null; 35 private String key2 = null; 36 37 38 public TestKey() { 39 } 40 41 42 43 public TestKey(String key1, String key2) { 44 this.key1 = key1; 45 this.key2 = key2; 46 } 47 48 49 52 public String getKey1() { 53 return key1; 54 } 55 56 57 60 public void setKey1(String key1) { 61 this.key1 = key1; 62 } 63 64 65 68 public String getKey2() { 69 return key1; 70 } 71 72 73 76 public void setKey2(String key2) { 77 this.key2 = key2; 78 } 79 80 81 84 public int hashCode() { 85 return (key1 + key1).hashCode(); 86 } 87 88 89 95 public boolean equals(Object value) { 96 if (!(value instanceof TestKey)) { 97 return false; 98 } 99 TestKey testKey = (TestKey)value; 100 return (key1.equals(testKey.getKey1()) && 101 key2.equals(testKey.getKey2())); 102 } 103 } 104 | Popular Tags |