Changeset 385 for trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/data/JFCTargetComparator.java
- Timestamp:
- 02/15/12 15:02:03 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/data/JFCTargetComparator.java
r380 r385 170 170 String[] widgetInfo = widgetString.split("','"); 171 171 JFCWidget widget = new JFCWidget(); 172 widget.titles.add(widgetInfo[0]); 172 if (widgetInfo[0].startsWith("'Pos(")) { 173 widget.titles.add("Pos"); 174 } else { 175 widget.titles.add(widgetInfo[0]); 176 } 173 177 widget.widgetClass = widgetInfo[1]; 174 widget. index= widgetInfo[2];175 widget. text= widgetInfo[3];178 widget.text = widgetInfo[2]; 179 widget.index = widgetInfo[3]; 176 180 widget.hashCodes.add(widgetInfo[4]); 177 181 return widget; … … 311 315 hashCodesCopy.retainAll(other.hashCodes); 312 316 313 return (widgetClass.equals(other.widgetClass) 314 && index.equals(other.index) && text.equals(other.text) && (!titlesCopy 315 .isEmpty() || !hashCodesCopy.isEmpty())); 317 boolean retVal; 318 if (widgetClass.equals("Class")) { 319 retVal = (widgetClass.equals(other.widgetClass) 320 && text.equals(other.text) && (!titlesCopy 321 .isEmpty() || !hashCodesCopy.isEmpty())); 322 } else { 323 retVal = (widgetClass.equals(other.widgetClass) 324 && index.equals(other.index) 325 && text.equals(other.text) && (!titlesCopy 326 .isEmpty() || !hashCodesCopy.isEmpty())); 327 } 328 return retVal; 316 329 } 317 330 return false; … … 328 341 int hashCode = 0; 329 342 hashCode = multiplier * hashCode + widgetClass.hashCode(); 330 hashCode = multiplier * hashCode + index.hashCode(); 343 if (!widgetClass.equals("Class")) { 344 hashCode = multiplier * hashCode + index.hashCode(); 345 } 331 346 hashCode = multiplier * hashCode + text.hashCode(); 332 347 return hashCode;
Note: See TracChangeset
for help on using the changeset viewer.