363738394041424344
if (nextOperation.equals(operation)) continue; if (!nextOperation.getSourceType().equals(targetType)) continue; INode node = new Node(nextOperation, availableOperations); edges.add(new Edge(node, 1)); } return edges; }
2021222324252627282930
this.queueInserter = queueInserter; } public Path search(INode start) { List<Path> queue = new ArrayList<Path>(); queue.add(new Path(null, new Edge(start, 0))); while (true) { if (queue.isEmpty()) return null; Path bestPath = queue.remove(0);