Adds all elements from the given {@link KTypeContainer} to this set.

@return Returns the number of elements actually added as a result of this
call (not previously present in the set).
184123
public int addAll(KTypeContainer<? extends KType> container) {
    ensureCapacity(container.size());
    return addAll((Iterable<? extends KTypeCursor<? extends KType>>) container);
  }
368850
@SuppressWarnings("unchecked")
    public Iterator<K> keys()
    {
        int size = _size;

        if (size == 0)
        {
            return null;
        }
        ArrayList<K> keyList = new ArrayList<K>();
        int i = (size - 1) * 2;
        while (i >= 0)
        {
            keyList.add((K) _array[i]);
            i = i - 2;
        }
        return keyList.iterator();
    }
783948
@Override public ImmutableSet<Entry<K, V>> entries() {
    ImmutableSet<Entry<K, V>> result = entries;
    return (result == null)
        ? (entries = new EntrySet<K, V>(this))
        : result;
  }
345023
public boolean add(final float k) {
		int intKey = Float.floatToIntBits(k);
		if (intKey == 0) {
			if (this.containsZero) {
				return false;
			}

			this.containsZero = true;
		} else {
			float[] key = this.key;
			int pos;
			int curr;
			if ((curr = Float.floatToIntBits(key[pos = MurmurHashUtil.fmix(intKey) & this.mask])) != 0) {
				if (curr == intKey) {
					return false;
				}

				while ((curr = Float.floatToIntBits(key[pos = pos + 1 & this.mask])) != 0) {
					if (curr == intKey) {
						return false;
					}
				}
			}

			key[pos] = k;
		}

		if (this.size++ >= this.maxFill) {
			this.rehash(OptimizableHashSet.arraySize(this.size + 1, this.f));
		}

		return true;
	}
53081
public static <E> ArraySet<E> newArraySet(E... elements) {
        int capacity = elements.length * 4 / 3 + 1;
        ArraySet<E> set = new ArraySet<E>(capacity);
        Collections.addAll(set, elements);
        return set;
    }
499043
public Set<Map.Entry<A,B>> entrySet() {
	return new AbstractSet<Map.Entry<A,B>>() {
	    public int size() {
		return map.size();
	    }
	    public Iterator<Map.Entry<A,B>> iterator() {
		return new Iterator<Map.Entry<A,B>>() {
		    private final Iterator<Map.Entry<A,B>> it = map.entrySet().iterator();
		    private Map.Entry<A,B> last = null;
		    public boolean hasNext() {
			return it.hasNext(); 
		    }
		    public Map.Entry<A,B> next() { 
		        last = it.next();
			return last;
		    }
		    public void remove() {
			it.remove();
			revMap.remove(last.getValue());
		    }
		};
	    }
	    public boolean remove(Object o) {
		if(!(o instanceof Map.Entry/*<A,B>*/)) return false;
		@SuppressWarnings("unchecked")
		Map.Entry<A,B> entry = (Map.Entry<A,B>) o;
		B currValue = BijMap.this.get(entry.getKey());
		if((currValue == null) || !currValue.equals(entry.getValue())) return false;
		BijMap.this.remove(entry.getKey());
		return true;
	    }
	    public void clear() {
		BijMap.this.clear();
	    }
	};
    }
797744
public IntSet.IntIterator iterator()
  {
    if (isEmpty()) {
      return new IntSet.IntIterator()
      {
        @Override
        public void skipAllBefore(int element) {/*empty*/}

        @Override
        public boolean hasNext() {return false;}

        @Override
        public int next() {throw new NoSuchElementException();}

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

        @Override
        public IntSet.IntIterator clone() {throw new UnsupportedOperationException();}
      };
    }
    return new BitIterator();
  }
291007
public Set<String> getSupportedTypes(){
		Set<String> typeset = new HashSet<String>();
		Set<String> set = factory.DefaultLabelAlphabet().toSet();
		Iterator<String> itt = set.iterator();
		while(itt.hasNext()){
			String type = itt.next();
			if(type.length() ==1 )
				continue;
			typeset.add(type.substring(1));
		}
		return typeset;
	}
700175
public final Set<K> keySet() {
	return new AbstractSet<K>() {
	    public Iterator<K> iterator() {
		final Iterator<Map.Entry<K,V>> ite = entryIterator();
		return new Iterator<K>() {
		    public boolean hasNext() { return ite.hasNext(); }
		    public void    remove()  { ite.remove(); }
		    public K       next()    { return ite.next().getKey(); }
		};
	    }
	    public int size() {
		return size;
	    }
	};
    }
326150
public Set<Entry<K, V>> entrySet() {
        TreeSet<Entry<K,V>> set = new TreeSet<Entry<K,V>>();
        
        synchronized( this ) {
            for(K key : keySet() ) {
                if( containsKey(key) ) {
                    get(key);
                    set.add(getEntry(key));
                }
            }
            return set;
        }
    }
1138012
public function add()
    {

        foreach( func_get_args() as $obj ){

            if( is_object($obj) ) {

                if( $obj instanceof Container ) {

                    if( !$this->checkEntityContainer( $obj, $error ) ) {
                        throw new IncompatibleContainerException($error);
                    }

                    $this->collection = $this->collection + $obj->collection;

                    // if the passed container has a class and we don't, update ours
                    if( isset( $obj->class ) and !isset( $this->class ) ) {
                        $this->class = $obj->class;
                    }

                } elseif( $this->checkEntity( $obj ) ) {

                    $this->collection[spl_object_hash($obj)] = $obj;

                }

            } elseif( is_array( $obj ) ) {

                if( !$this->checkEntityArray( $obj, $error ) ) {
                    throw new IncompatibleContainerException($error);
                }

                foreach ( $obj as $key => $_obj ) {
                    $this->collection[spl_object_hash($_obj)] = $_obj;
                }

            } elseif( is_null( $obj ) ) {

                continue;

            } else {

                throw new BadTypeException( $obj, "Not suitable to go into container" );;

            }

        }

        $this->rewind();

        return $this;
    }
985739
@Override
  public void addAll(Map<K, V> m) {
    for (Map.Entry<K, V> e : m.entrySet()) {
      add(e.getKey(), e.getValue());
    }
  }
1086763
public Iterator<ElementType> iterator() {
        return new Iterator<ElementType>() {
            int idx = getIdx;
            int N = size;

            public boolean hasNext() {
                return N > 0;
            }

            public ElementType next() {
                ElementType x = (ElementType) elements[idx];
                idx = (idx + 1) % elements.length;
                N--;
                return x;
            }

            public void remove() {
                throw new UnsupportedOperationException("remove");
            }
        };
    }
744889
@Override
	public boolean addAll(Collection<? extends T> newElements) {
		for (T newElement : newElements) {
			add(newElement);
		}
		return true;
	}
726519
public int add(K key)
    {
        int[] f = get(key);
        if (f == null)
        {
            f = new int[]{1};
            put(key, f);
        }
        else ++f[0];

        return f[0];
    }
1253134
public int addAll(Iterable<? extends KTypeCursor<? extends KType>> iterable) {
    int count = 0;
    for (KTypeCursor<? extends KType> cursor : iterable) {
      if (add(cursor.value)) {
        count++;
      }
    }
    return count;
  }
190824
@Override
  public int putAll(Iterable<? extends KTypeVTypeCursor<? extends KType, ? extends VType>> iterable){
    final int count = size();
    for (KTypeVTypeCursor<? extends KType, ? extends VType> c : iterable) {
      put(c.key, c.value);
    }
    return size() - count;
  }