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