001: package net.sf.jdec.settings;
002:
003: /*
004: * Variable.java Copyright (c) 2006,07 Swaroop Belur
005: *
006: * This program is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU General Public License
008: * as published by the Free Software Foundation; either version 2
009: * of the License, or (at your option) any later version.
010:
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015:
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
019: *
020: */
021:
022: public class Variable {
023:
024: private String prefix;
025:
026: private String pkg;
027:
028: private String defaultPackage;
029:
030: private String className;
031:
032: private String isPrimitive;
033:
034: public String getClassName() {
035: return className;
036: }
037:
038: public void setClassName(String className) {
039: this .className = className;
040: }
041:
042: public String getDefaultPackage() {
043: return defaultPackage;
044: }
045:
046: public void setDefaultPackage(String defaultPackage) {
047: this .defaultPackage = defaultPackage;
048: }
049:
050: public String getPrefix() {
051: return prefix;
052: }
053:
054: public void setPrefix(String prefix) {
055: this .prefix = prefix;
056: }
057:
058: public String getPkg() {
059: return pkg;
060: }
061:
062: public void setPkg(String pkg) {
063: this .pkg = pkg;
064: }
065:
066: public String getIsPrimitive() {
067: return isPrimitive;
068: }
069:
070: public void setIsPrimitive(String isPrimitive) {
071: this .isPrimitive = isPrimitive;
072: }
073:
074: public int hashCode() {
075: final int PRIME = 31;
076: int result = 1;
077: result = PRIME * result
078: + ((className == null) ? 0 : className.hashCode());
079: result = PRIME
080: * result
081: + ((defaultPackage == null) ? 0 : defaultPackage
082: .hashCode());
083: result = PRIME * result
084: + ((isPrimitive == null) ? 0 : isPrimitive.hashCode());
085: result = PRIME * result + ((pkg == null) ? 0 : pkg.hashCode());
086: result = PRIME * result
087: + ((prefix == null) ? 0 : prefix.hashCode());
088: return result;
089: }
090:
091: public boolean equals(Object obj) {
092: if (this == obj)
093: return true;
094: if (obj == null)
095: return false;
096: if (getClass() != obj.getClass())
097: return false;
098: final Variable other = (Variable) obj;
099: if (className == null) {
100: if (other.className != null)
101: return false;
102: } else if (!className.equals(other.className))
103: return false;
104: if (defaultPackage == null) {
105: if (other.defaultPackage != null)
106: return false;
107: } else if (!defaultPackage.equals(other.defaultPackage))
108: return false;
109: if (isPrimitive == null) {
110: if (other.isPrimitive != null)
111: return false;
112: } else if (!isPrimitive.equals(other.isPrimitive))
113: return false;
114: if (pkg == null) {
115: if (other.pkg != null)
116: return false;
117: } else if (!pkg.equals(other.pkg))
118: return false;
119: if (prefix == null) {
120: if (other.prefix != null)
121: return false;
122: } else if (!prefix.equals(other.prefix))
123: return false;
124: return true;
125: }
126:
127: }
|