- Timestamp:
- 12/23/14 11:19:57 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/utils/TaskTraversal.java
r1767 r1849 19 19 import java.util.LinkedList; 20 20 import java.util.List; 21 import java.util.Set;22 21 23 22 import de.ugoe.cs.autoquest.tasktrees.treeifc.DefaultTaskTraversingVisitor; … … 43 42 /** */ 44 43 private TaskPath[] traversalPathArray = null; 45 44 45 /** */ 46 private ITask task = null; 47 46 48 /** 47 49 * 48 50 */ 49 51 public static TaskTraversal getTraversal(ITask task, 50 final Set<ITask> untraversedTasks,51 52 final List<TaskPath> untraversedPaths) 52 53 { … … 68 69 currentPath.add(relationship, currentIndex[0]); 69 70 70 if (pathIsInList(currentPath, untraversedPaths) || 71 untraversedTasks.contains(relationship)) 72 { 71 if (pathIsInList(currentPath, untraversedPaths)) { 73 72 result.add(new TaskPath(currentPath)); 74 73 } … … 90 89 @Override 91 90 public void visit(ISelection relationship) { 92 // selections are never traversed as a traversal can have different orders for91 // selections are never traversed as a traversal can have different orders 93 92 // for semantically identical selections 94 93 currentPath.add(relationship, currentIndex[0]); … … 107 106 currentPath.add(relationship, currentIndex[0]); 108 107 109 if (pathIsInList(currentPath, untraversedPaths) || 110 untraversedTasks.contains(relationship)) 111 { 108 if (pathIsInList(currentPath, untraversedPaths)) { 112 109 result.add(new TaskPath(currentPath)); 113 110 } … … 176 173 * 177 174 */ 175 public ITask getTask() { 176 return task; 177 } 178 179 /** 180 * 181 */ 178 182 public ITask get(int i) { 179 183 return traversalPathArray[i].getLast(); … … 219 223 traversalPathArray = traversalPaths.toArray(new TaskPath[traversalPaths.size()]); 220 224 traversalPaths = null; 225 task = traversalPathArray[0].getTask(0); 221 226 } 222 227
Note: See TracChangeset
for help on using the changeset viewer.