Java Iterator addAll(Set s, Iterator i)

Here you can find the source of addAll(Set s, Iterator i)

Description

add All

License

Open Source License

Declaration

private static void addAll(Set s, Iterator i) 

Method Source Code


//package com.java2s;

import java.util.Iterator;

import java.util.Set;

public class Main {
    private static void addAll(Set s, Iterator i) {
        while (i != null && i.hasNext()) {
            s.add(i.next());//from w ww  .  ja  v a2  s.  c o  m
        }
    }
}

Related

  1. addAll(final C collection, final Iterator iter)
  2. addAll(final Collection targetCollection, final Iterator sourceIterator)
  3. addAll(Iterator iteratorFrom, Collection collectionTo)
  4. addAll(Iterator source, U target)
  5. addAll(List target, Iterator source)
  6. addAllFromIterator( COLL dest, Iterator source)
  7. addAllToList(Iterator i)
  8. addAllToSet(Set set, Iterator it)
  9. addTo(final Iterator iter, final C c)