if (knownMod != modCount) throw new ConcurrentModificationException();
  Iterator iterator(final int type)  {    return new Iterator()    {      /** The current Entry. */      LinkedHashEntry current = root;      /** The previous Entry returned by next(). */      LinkedHashEntry last;      /** The number of known modifications to the backing Map. */      int knownMod = modCount;      /**       * Returns true if the Iterator has more elements.       *       * @return true if there are more elements       * @throws ConcurrentModificationException if the HashMap was modified       */      public boolean hasNext()      {        if (knownMod != modCount)          throw new ConcurrentModificationException();        return current != null;      }      /**       * Returns the next element in the Iterator's sequential view.       *       * @return the next element       * @throws ConcurrentModificationException if the HashMap was modified       * @throws NoSuchElementException if there is none       */      public Object next()      {        if (knownMod != modCount)          throw new ConcurrentModificationException();        if (current == null)          throw new NoSuchElementException();        last = current;        current = current.succ;        return type == VALUES ? last.value : type == KEYS ? last.key : last;      }            /**       * Removes from the backing HashMap the last element which was fetched       * with the <code>next()</code> method.       *       * @throws ConcurrentModificationException if the HashMap was modified       * @throws IllegalStateException if called when there is no last element       */      public void remove()      {        if (knownMod != modCount)          throw new ConcurrentModificationException();        if (last == null)          throw new IllegalStateException();        LinkedHashMap.this.remove(last.key);        last = null;        knownMod++;      }    };  }