protected List getPathToHere() { return this.pipe.getCurrentPath(); }
public List getCurrentPath() { if (this.pathEnabled) return this.endPipe.getCurrentPath(); else throw new RuntimeException(Pipe.NO_PATH_MESSAGE); }
public List getCurrentPath() { if (this.pathEnabled) return this.pipes.get(this.current).getCurrentPath(); else throw new RuntimeException(Pipe.NO_PATH_MESSAGE); }
public List getCurrentPath() { if (this.pathEnabled) { int tempCurrent = this.current - 1; if (tempCurrent < 0) tempCurrent = this.total - 1; return this.pipes.get(tempCurrent).getCurrentPath(); } else throw new RuntimeException(Pipe.NO_PATH_MESSAGE); }
public List getCurrentPath() { if (null == this.current) return null; else return this.current.getPath(); }
public S processNextStart() { while (true) { final S s = this.starts.next(); if (this.starts instanceof Pipe) { final List path = ((Pipe) this.starts).getCurrentPath(); this.set.clear(); this.set.addAll(path); if (path.size() == this.set.size()) { return s; } } else { return s; } } } }
protected List getPathToHere() { if (this.starts instanceof Pipe) { return ((Pipe) this.starts).getCurrentPath(); } else if (this.starts instanceof HistoryIterator) { final List list = new ArrayList(); list.add(((HistoryIterator) this.starts).getLast()); return list; } else { return new ArrayList(); } }
public List processNextStart() { if (this.starts instanceof Pipe) { this.starts.next(); final List path = ((Pipe) this.starts).getCurrentPath(); if (null == this.pathFunctions) { return path; } else { final List closedPath = new ArrayList(); int nextFunction = 0; for (final Object object : path) { closedPath.add(this.pathFunctions[nextFunction].compute(object)); nextFunction = (nextFunction + 1) % this.pathFunctions.length; } return closedPath; } } else { throw new NoSuchElementException("The start of this pipe was not a pipe"); } }
public List processNextStart() { if (this.starts instanceof Pipe) { this.starts.next(); final List path = ((Pipe) this.starts).getCurrentPath(); if (null == this.pathFunctions) { return path; } else { final List closedPath = new Path(); int nextFunction = 0; for (final Object object : path) { closedPath.add(this.pathFunctions[nextFunction].compute(object)); nextFunction = (nextFunction + 1) % this.pathFunctions.length; } return closedPath; } } else { throw new NoSuchElementException("The start of this pipe was not a pipe"); } }
public S processNextStart() { final S s = this.starts.next(); final List path = ((Pipe) this.starts).getCurrentPath(); Tree<Object> depth = this.tree; for (int i = 0; i < path.size(); i++) { Object object = path.get(i); if (null != this.branchFunctions) { object = this.branchFunctions.get(this.currentFunction).compute(object); this.currentFunction = (this.currentFunction + 1) % this.branchFunctions.size(); } if (!depth.containsKey(object)) depth.put(object, new Tree()); depth = depth.get(object); } return s; }