1 package org.tigris.scarab.util.build.l10nchecker; 2 3 48 49 import org.apache.commons.lang.builder.HashCodeBuilder; 50 51 57 public class L10nKey 58 { 59 62 private String key; 63 64 67 private String value; 68 69 72 private int lineNo; 73 74 77 private int attributeCount = 0; 78 79 86 private boolean needTrans = false; 87 88 92 private boolean noTrans = false; 93 94 104 public L10nKey(String key, String value, int lineNo) 105 { 106 this.key = key; 107 this.value = value; 108 this.lineNo = lineNo; 109 } 110 111 114 public String getKey() 115 { 116 return key; 117 } 118 119 122 public int getLineNo() 123 { 124 return lineNo; 125 } 126 127 130 public String getValue() 131 { 132 return value; 133 } 134 135 138 public int getAttributeCount() 139 { 140 return attributeCount; 141 } 142 143 147 public void setAttributeCount(int attributeCount) 148 { 149 this.attributeCount = attributeCount; 150 } 151 152 155 public boolean isNeedTrans() 156 { 157 return needTrans; 158 } 159 160 164 public void setNeedTrans(boolean needTrans) 165 { 166 this.needTrans = needTrans; 167 } 168 169 172 public boolean isNoTrans() 173 { 174 return noTrans; 175 } 176 177 181 public void setNoTrans(boolean noTrans) 182 { 183 this.noTrans = noTrans; 184 } 185 186 189 public int hashCode() 190 { 191 return new HashCodeBuilder(-995326837, 526330937).append(this.key) 192 .toHashCode(); 193 } 194 195 198 public boolean equals(Object object) 199 { 200 if (!(object instanceof L10nKey)) 201 { 202 return false; 203 } 204 L10nKey rhs = (L10nKey) object; 205 return this.key.equals(rhs.key); 206 } 207 } 208 | Popular Tags |