@Override public synchronized Integer next() { if (hasNext()) { return mTour.getNodeAt(mPosition++); } else { throw new NoSuchElementException(); } }
@Override public synchronized Integer previous() { if (hasPrevious()) { return mTour.getNodeAt(--mPosition); } else { throw new NoSuchElementException(); } }
@Override public synchronized boolean hasNext() { return mPosition < mTour.length(); }