Changeset 1294 for trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolBucketedMap.java
- Timestamp:
- 08/14/13 17:04:42 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolBucketedMap.java
r1285 r1294 27 27 28 28 import de.ugoe.cs.autoquest.eventcore.IEventType; 29 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 30 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration; 31 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection; 32 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence; 33 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 29 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance; 30 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance; 31 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance; 32 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance; 34 33 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance; 35 34 import de.ugoe.cs.autoquest.usageprofiles.SymbolMap; … … 81 80 * </p> 82 81 */ 83 private Task Comparator comparator;82 private TaskInstanceComparator comparator; 84 83 85 84 /** … … 117 116 * @throws IllegalArgumentException if the provided comparator is null 118 117 */ 119 public TaskSymbolBucketedMap(Task Comparator comparator) {118 public TaskSymbolBucketedMap(TaskInstanceComparator comparator) { 120 119 if (comparator == null) { 121 120 throw new IllegalArgumentException("comparator must not be null"); … … 400 399 // other = hashCode of name of event type 401 400 402 ITask task = taskInstance.getTask(); 403 404 if (task instanceof IEventTask) { 401 if (taskInstance instanceof IEventTaskInstance) { 405 402 // event tasks are most likely equal to those of the event type with the same name, 406 403 // Afterwards, they may be equal to iterations, optionals, other event tasks, 407 404 // selections, and finally the rest. 408 IEventType eventType = ((IEventTask ) task).getEventType();405 IEventType eventType = ((IEventTaskInstance) taskInstance).getEvent().getType(); 409 406 return new int[] { eventType.getName().hashCode(), 2, 3, 4, 1 }; 410 407 } 411 else if (task instanceof ISequence) {408 else if (taskInstance instanceof ISequenceInstance) { 412 409 return new int[] { 0, 2, 3, 1 }; 413 410 } 414 else if (task instanceof ISelection) {411 else if (taskInstance instanceof ISelectionInstance) { 415 412 return new int[] { 1, 4, 2, 3 }; 416 413 } 417 else if (task instanceof IIteration) {414 else if (taskInstance instanceof IIterationInstance) { 418 415 return new int[] { 2, 1, 4 }; 419 416 }
Note: See TracChangeset
for help on using the changeset viewer.