org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetTypeDescriptor.java
equal
deleted
inserted
replaced
120 final String attribute = element.getAttribute("priority"); |
120 final String attribute = element.getAttribute("priority"); |
121 if (attribute != null && attribute.trim().length() > 0) { |
121 if (attribute != null && attribute.trim().length() > 0) { |
122 try { |
122 try { |
123 return Integer.parseInt(attribute); |
123 return Integer.parseInt(attribute); |
124 } catch (NumberFormatException e) { |
124 } catch (NumberFormatException e) { |
125 MTWCoreUI.log(String.format("%s is not a valid priority value for %s provider", attribute, getId()), |
125 MTWCoreUI.log("%s is not a valid priority value for %s provider", attribute, getId()); |
126 null); |
|
127 } |
126 } |
128 } |
127 } |
129 return 0; |
128 return 0; |
130 } |
129 } |
131 |
130 |
143 |
142 |
144 public ISchedulingRule getSchedulingRule(IDeploymentTarget target) { |
143 public ISchedulingRule getSchedulingRule(IDeploymentTarget target) { |
145 return type.getSchedulingRule(target); |
144 return type.getSchedulingRule(target); |
146 } |
145 } |
147 |
146 |
|
147 @Override |
|
148 public int hashCode() { |
|
149 final int prime = 31; |
|
150 int result = 1; |
|
151 result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
|
152 return result; |
|
153 } |
|
154 |
|
155 @Override |
|
156 public boolean equals(Object obj) { |
|
157 if (this == obj) { |
|
158 return true; |
|
159 } |
|
160 if (obj == null) { |
|
161 return false; |
|
162 } |
|
163 if (getClass() != obj.getClass()) { |
|
164 return false; |
|
165 } |
|
166 DeploymentTargetTypeDescriptor other = (DeploymentTargetTypeDescriptor) obj; |
|
167 if (getId() == null) { |
|
168 if (other.getId() != null) { |
|
169 return false; |
|
170 } |
|
171 } else if (!getId().equals(other.getId())) { |
|
172 return false; |
|
173 } |
|
174 return true; |
|
175 } |
|
176 |
148 } |
177 } |