Пример #1
0
 /**
  * Return the next Link on the chain.
  *
  * @return a reference to the next Link on the chain.
  * @throws NoSuchElementException if there is no next Link on the chain.
  */
 public Link<Type> next() throws NoSuchElementException {
   if (here == origin) {
     throw new NoSuchElementException();
   }
   if (origin == null) {
     origin = here;
   }
   latest = here;
   here = here.getNext();
   return latest;
 }