Creates an iterator over the entries of this map.

@return An iterator over the entries of this map.
334539
@Override
	public Iterator<Entry<K, V>> iterator() {
		return new Iterator<Entry<K, V>>() {

			private final Entry<K, V>[] tab = KeyMap.this.table;

			private Entry<K, V> nextEntry;

			private int nextPos = 0;

			@Override
			public boolean hasNext() {
				if (nextEntry != null) {
					return true;
				}
				else {
					while (nextPos < tab.length) {
						Entry<K, V> e = tab[nextPos++];
						if (e != null) {
							nextEntry = e;
							return true;
						}
					}
					return false;
				}
			}

			@Override
			public Entry<K, V> next() {
				if (nextEntry != null || hasNext()) {
					Entry<K, V> e = nextEntry;
					nextEntry = nextEntry.next;
					return e;
				}
				else {
					throw new NoSuchElementException();
				}
			}

			@Override
			public void remove() {
				throw new UnsupportedOperationException();
			}
		};
	}
104152
@Override
    public Iterator<T> iterator() {
        return outputType == OutputType.INLINE ? getInlineResults() : createQuery().fetch().iterator();
    }
1012542
@Override
  public Iterator<T> iterator() {
    return new Iterator<T>() {

      /** The index of the next item. */
      private int next = ArrayQueue.this.next;

      /* (non-Javadoc)
       * @see java.util.Iterator#hasNext()
       */
      public boolean hasNext() {
        return next < items.length;
      }

      /* (non-Javadoc)
       * @see java.util.Iterator#next()
       */
      public T next() {
        if (next >= items.length) {
          throw new NoSuchElementException();
        }
        return items[next++];
      }

      /* (non-Javadoc)
       * @see java.util.Iterator#remove()
       */
      public void remove() {
        throw new UnsupportedOperationException();
      }

    };
  }
639770
public Iterator iterator() {
        return new Iterator() {
            private ObjectSinkNode currentNode = null;
            private ObjectSinkNode nextNode    = getFirst();

            public boolean hasNext() {
                return (this.nextNode != null);
            }

            public Object next() {
                this.currentNode = this.nextNode;
                if ( this.currentNode != null ) {
                    this.nextNode = this.currentNode.getNextObjectSinkNode();
                } else {
                    throw new NoSuchElementException( "No more elements to return" );
                }
                return this.currentNode;
            }

            public void remove() {
                if ( this.currentNode != null ) {
                    ObjectSinkNodeList.this.remove( this.currentNode );
                    this.currentNode = null;
                } else {
                    throw new IllegalStateException( "No item to remove. Call next() before calling remove()." );
                }
            }
        };
    }
1372053
@Override
	public Iterator<Map.Entry<K, V>> iterator() {
		return Collections.unmodifiableSet(state.entrySet()).iterator();
	}
966508
@Override
	public Iterator<C> iterator() {
		final List<Sequence<C>> localSequences = sequences;
		return new Iterator<C>() {

			private Iterator<C> currentSequenceIterator = null;
			private int currentPosition = 0;


			@Override
			public boolean hasNext() {
				//If the current iterator is null then see if the Sequences object has anything
				if (currentSequenceIterator == null) {
					return !localSequences.isEmpty();
				}

				//See if we had any compounds
				boolean hasNext = currentSequenceIterator.hasNext();
				if (!hasNext) {
					hasNext = currentPosition < sequences.size();
				}
				return hasNext;
			}


			@Override
			public C next() {
				if (currentSequenceIterator == null) {
					if (localSequences.isEmpty()) {
						throw new NoSuchElementException("No sequences to iterate over; make sure you call hasNext() before next()");
					}
					currentSequenceIterator = localSequences.get(currentPosition).iterator();
					currentPosition++;
				}
				if (!currentSequenceIterator.hasNext()) {
					currentSequenceIterator = localSequences.get(currentPosition).iterator();
					currentPosition++;
				}
				return currentSequenceIterator.next();
			}


			@Override
			public void remove() throws UnsupportedOperationException {
				throw new UnsupportedOperationException("Cannot remove from this Sequence");
			}
		};
	}
946204
@Override
    public Set<Entry<String, Object>> entrySet() {
        return new AbstractSet<Entry<String, Object>>() {
            @Override
            public Iterator<Entry<String, Object>> iterator() {
                return entryIterator();
            }

            @Override
            public int size() {
                return BeanMap.this.readMethods.size();
            }
        };
    }
242608
public Iterator<Row> iterator()
    {
        if (this.rows != null)
        {
            return Arrays.asList(this.rows).iterator();
        }
        else
        {
            return ConvertibleIteratorUtils.iterateAsRow(this.pbRows.iterator(), this.pbColumnDescriptions);
        }
    }
1051204
public static <K, V> Map<K, V> collectEntries(Iterator<?> self) {
        return collectEntries(self, Closure.IDENTITY);
    }
312629
public Iterator<Long> iterator() {
    final LongIterator it = getLongIterator();

    return new Iterator<Long>() {

      @Override
      public boolean hasNext() {
        return it.hasNext();
      }

      @Override
      public Long next() {
        return it.next();
      }

      @Override
      public void remove() {
        // TODO?
        throw new UnsupportedOperationException();
      }
    };
  }
353237
public Iterator<Pixel> iterator() {
        return new Iterator<Pixel>() {

            private int k = 0;

            @Override
            public boolean hasNext() {
                return k < AwtImage.this.count();
            }

            @Override
            public Pixel next() {
                Coordinate coord = PixelTools.offsetToCoordinate(k++, width);
                int rgb = awt.getRGB(coord.getX(), coord.getY());
                return new Pixel(rgb);
            }
        };
    }
673104
public Iterator iterator()
        {
        CsvPreference preferences =
                new CsvPreference.Builder(m_quoteChar, m_delimiterChar, m_endOfLineSymbols).build();
        return new CsvIterator(new CsvListReader(m_reader, preferences), m_header);
        }
905786
@Override
  public Set<Map.Entry<K,V>> entrySet() {
    return new AbstractSet<Map.Entry<K,V>>() {
      @Override
      public Iterator<Map.Entry<K,V>> iterator() {
        Filter<Map.Entry<K,V>> filter1 = new Filter<Map.Entry<K,V>>() {
          private static final long serialVersionUID = 1L;

          // only accepts stuff not overwritten by deltaMap
          public boolean accept(Map.Entry<K,V> e) {
            K key = e.getKey();
            return ! deltaMap.containsKey(key);
          }
        };

        Iterator<Map.Entry<K, V>> iter1 = new FilteredIterator<Map.Entry<K, V>>(originalMap.entrySet().iterator(), filter1);

        Filter<Map.Entry<K,V>> filter2 = new Filter<Map.Entry<K,V>>() {
          private static final long serialVersionUID = 1L;
          // only accepts stuff not overwritten by deltaMap
          public boolean accept(Map.Entry<K,V> e) {
            Object value = e.getValue();
            if (value == removedValue) {
              return false;
            }
            return true;
          }
        };

        class NullingIterator<K, V> implements Iterator<Map.Entry<K,V>> {
          private Iterator<Map.Entry<K, V>> i;

          public NullingIterator(Iterator<Map.Entry<K, V>> i) {
            this.i = i;
          }

          public boolean hasNext() {
            return i.hasNext();
          }

          public Map.Entry<K, V> next() {
            Map.Entry<K,V> e = i.next();
            Object o = e.getValue();
            if (o == nullValue) {
              return new SimpleEntry<K,V>(e.getKey(), null);
            }
            return e;
          }

          public void remove() {
            throw new UnsupportedOperationException();
          }
        }

        Iterator<Entry<K, V>> iter2 = new FilteredIterator<Entry<K,V>>(new NullingIterator<K, V>(deltaMap.entrySet().iterator()), filter2);

        return new ConcatenationIterator<Entry<K,V>>(iter1, iter2);
      }

      @Override
      public int size() {
        int size = 0;
        for (Entry<K, V> kvEntry : this) {
          ErasureUtils.noop(kvEntry);
          size++;
        }
        return size;
      }
    };
  }
422908
IntIterator keyIterator() {
        return new IntIterator() {

            final IntIterator setitr = set.keyIterator();

            public boolean hasNext() {
                return setitr.hasNext();
            }

            public int next() {
                return setitr.next();
            }

        };
    }
886981
public java.util.Iterator iterator() {
        // TODO Bug in remove from a concurrentSet/Map iterator, it does not actually do the remove!
        java.util.Set combinedSet = new java.util.HashSet();
        if (subSets != null) {
            for (int i = 0; i < subSets.length; i++) {
                synchronized (subSets[i]) {
                    combinedSet.addAll(subSets[i]);
                } // synchronized (subSet).
            }
        }
        return combinedSet.iterator();
    }
1093168
public Entries<K, V> entries () {
		if (entries == null)
			entries = new Entries(this);
		else
			entries.reset();
		return entries;
	}
146825
public Iterator<Map.Entry<FieldDescriptorType, Object>> iterator() {
    if (hasLazyField) {
      return new LazyIterator<FieldDescriptorType>(
          fields.entrySet().iterator());
    }
    return fields.entrySet().iterator();
  }