Returns an {@link java.util.Iterator} which traverses the DefaultTableModel one item at a time.

@param self a DefaultTableModel
@return an Iterator for a DefaultTableModel
@since 1.6.4
356407
public static Iterator iterator(final DefaultTableModel self) {
        return new Iterator() {
            private int row = 0;

            public boolean hasNext() {
                return row > -1 && row < self.getRowCount();
            }

            public Object next() {
                int cols = self.getColumnCount();
                Object[] rowData = new Object[cols];
                for (int col = 0; col < cols; col++) {
                    rowData[col] = self.getValueAt(row, col);
                }
                row++;
                return rowData;
            }

            public void remove() {
                if (hasNext()) self.removeRow(row--);
            }
        };
    }
843726
public static <T> Iterator<T> toUnique(Iterator<T> self) {
        return toUnique(self, (Comparator<T>) null);
    }
36333
public Iterator<T> iterator() {
        Collection<ServiceReference<T>> fetchReferences = fetchReferences();
        return new ServiceReferenceIterator<T>(fetchReferences.iterator(), bundleContext);
    }
97632
public Iterator iterator()
   {
      if (tc.isEntryEnabled()) SibTr.entry(tc, "iterator");
      if (tc.isEntryEnabled()) SibTr.exit(tc, "iterator");

      return map.values().iterator();
   }
624322
public static <T> Iterator<T> toUnique(Iterator<T> self) {
        return new UniqueIterator<T>(self, null);
    }
963265
public Iterator<Entry<String, Object>> entryIterator() {
        final Iterator<String> iter = keyIterator();
        return new Iterator<Entry<String, Object>>() {
            @Override
            public boolean hasNext() {
                return iter.hasNext();
            }

            @Override
            public Entry<String, Object> next() {
                String key = iter.next();
                Object value = get(key);
                return new MyMapEntry(BeanMap.this, key, value);
            }

            @Override
            public void remove() {
                throw new UnsupportedOperationException("remove() not supported for BeanMap");
            }
        };
    }
29420
public Iterator<Map.Entry<T,Double>> iterator() {
        return Collections.unmodifiableSet(
            TDecorators.wrap(counts).entrySet()).iterator();
    }
1148246
public <T> CursorIterator<T> asIterator() {
		CursorIterable<T> iterable = asIterable();
		return iterable.iterator();
	}
502702
public static <T> List<T> toList(Iterator<T> self) {
        List<T> answer = new ArrayList<T>();
        while (self.hasNext()) {
            answer.add(self.next());
        }
        return answer;
    }
823134
public Iterator<Member> iterator() {
    final Iterator<String> namesIterator = names.iterator();
    final Iterator<JsonValue> valuesIterator = values.iterator();
    return new Iterator<JsonObject.Member>() {

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

      public Member next() {
        String name = namesIterator.next();
        JsonValue value = valuesIterator.next();
        return new Member(name, value);
      }

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

    };
  }
1249606
public static <T> Iterator<T> singleIterator(T t) {
        Require.nonNull(t, "t");
        return Collections.singleton(t).iterator();
    }
482103
public static <T> T min(Iterator<T> self) {
        return min((Iterable<T>)toList(self));
    }
17832
public static <T> Set<T> toSet(Iterator<T> self) {
        Set<T> answer = new HashSet<T>();
        while (self.hasNext()) {
            answer.add(self.next());
        }
        return answer;
    }
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();
      }

    };
  }
802244
public Iterator<Example> iterator()
    {
        return new Iterator<Example>()
        {
            private int index = 0;

            public boolean hasNext()
            {
                return at( index ) != null;
            }

            public Example next()
            {
                return at( index++ );
            }

            public void remove()
            {
                throw new UnsupportedOperationException( "Specification not mutable" );
            }
        };
    }
385134
public static <T> Iterator<T> eachWithIndex(Iterator<T> self, @ClosureParams(value=FromString.class, options="T,Integer") Closure closure) {
        final Object[] args = new Object[2];
        int counter = 0;
        while (self.hasNext()) {
            args[0] = self.next();
            args[1] = counter++;
            closure.call(args);
        }
        return self;
    }
821634
@Override
    public Iterator<T> iterator() {
        if (m_items == null) {
            m_items = new TreeMap<String, T>();
        }
        return m_items.values().iterator();
    }