@Test public void testAddAll() { KTypeHashSet<KType> set2 = new KTypeHashSet<KType>(); set2.addAll(asArray(1, 2)); set.addAll(asArray(0, 1)); assertEquals(1, set.addAll(set2)); assertEquals(0, set.addAll(set2)); assertEquals(3, set.size()); assertSortedListEquals(set.toArray(), 0, 1, 2); }
@SafeVarargs public final int addAll(KType... elements) { ensureCapacity(elements.length); int count = 0; for (KType e : elements) { if (add(e)) { count++; } } return count; }
KTypeHashSet extends AbstractKTypeCollection<KType> implements /*! #if ($templateonly) !*/ Intrinsics.KeyHasher<KType>, /*! #end !*/
             KTypeLookupContainer<KType>, 
             KTypeSet<KType>,
             Preallocable,
             Cloneable,
             Accountable { @SafeVarargs public final int addAll(KType... elements) { ensureCapacity(elements.length); int count = 0; for (KType e : elements) { if (add(e)) { count++; } } return count; } }
KTypeHashSet extends AbstractKTypeCollection<KType> implements /*! #if ($templateonly) !*/ Intrinsics.KeyHasher<KType>, /*! #end !*/
             KTypeLookupContainer<KType>, 
             KTypeSet<KType>,
             Preallocable,
             Cloneable,
             Accountable { @SafeVarargs public final int addAll(KType... elements) { ensureCapacity(elements.length); int count = 0; for (KType e : elements) { if (add(e)) { count++; } } return count; } KTypeHashSet();  KTypeHashSet(int expectedElements);  KTypeHashSet(int expectedElements, double loadFactor);  KTypeHashSet(KTypeContainer<? extends KType> container); }
KTypeHashSet extends AbstractKTypeCollection<KType> implements /*! #if ($templateonly) !*/ Intrinsics.KeyHasher<KType>, /*! #end !*/
             KTypeLookupContainer<KType>, 
             KTypeSet<KType>,
             Preallocable,
             Cloneable,
             Accountable { @SafeVarargs public final int addAll(KType... elements) { ensureCapacity(elements.length); int count = 0; for (KType e : elements) { if (add(e)) { count++; } } return count; } KTypeHashSet();  KTypeHashSet(int expectedElements);  KTypeHashSet(int expectedElements, double loadFactor);  KTypeHashSet(KTypeContainer<? extends KType> container); @Override boolean add(KType key); @SafeVarargs /* #end */ final int addAll(KType... elements); int addAll(KTypeContainer<? extends KType> container); int addAll(Iterable<? extends KTypeCursor<? extends KType>> iterable); @Override /*! #if ($TemplateOptions.KTypePrimitive) KType [] toArray() { #else !*/ Object[] toArray(); boolean remove(KType key); @Override int removeAll(KType key); int removeAll(KTypeContainer<? super KType> other); @Override int removeAll(KTypePredicate<? super KType> predicate); @Override boolean contains(KType key); @Override void clear(); @Override void release(); @Override boolean isEmpty(); @Override void ensureCapacity(int expectedElements); @Override int size(); @Override int hashCode(); @Override boolean equals(Object obj); @Override KTypeHashSet<KType> clone(); @Override Iterator<KTypeCursor<KType>> iterator(); @Override long ramBytesAllocated(); @Override long ramBytesUsed(); @Override T forEach(T procedure); @Override T forEach(T predicate); @SafeVarargs /* #end */ static KTypeHashSet<KType> from(KType... elements); @Override int hashKey(KType key); int indexOf(KType key); boolean indexExists(int index); KType indexGet(int index); KType indexReplace(int index, KType equivalentKey); void indexInsert(int index, KType key); @Override String visualizeKeyDistribution(int characters); }
KTypeHashSet extends AbstractKTypeCollection<KType> implements /*! #if ($templateonly) !*/ Intrinsics.KeyHasher<KType>, /*! #end !*/
             KTypeLookupContainer<KType>, 
             KTypeSet<KType>,
             Preallocable,
             Cloneable,
             Accountable { @SafeVarargs public final int addAll(KType... elements) { ensureCapacity(elements.length); int count = 0; for (KType e : elements) { if (add(e)) { count++; } } return count; } KTypeHashSet();  KTypeHashSet(int expectedElements);  KTypeHashSet(int expectedElements, double loadFactor);  KTypeHashSet(KTypeContainer<? extends KType> container); @Override boolean add(KType key); @SafeVarargs /* #end */ final int addAll(KType... elements); int addAll(KTypeContainer<? extends KType> container); int addAll(Iterable<? extends KTypeCursor<? extends KType>> iterable); @Override /*! #if ($TemplateOptions.KTypePrimitive) KType [] toArray() { #else !*/ Object[] toArray(); boolean remove(KType key); @Override int removeAll(KType key); int removeAll(KTypeContainer<? super KType> other); @Override int removeAll(KTypePredicate<? super KType> predicate); @Override boolean contains(KType key); @Override void clear(); @Override void release(); @Override boolean isEmpty(); @Override void ensureCapacity(int expectedElements); @Override int size(); @Override int hashCode(); @Override boolean equals(Object obj); @Override KTypeHashSet<KType> clone(); @Override Iterator<KTypeCursor<KType>> iterator(); @Override long ramBytesAllocated(); @Override long ramBytesUsed(); @Override T forEach(T procedure); @Override T forEach(T predicate); @SafeVarargs /* #end */ static KTypeHashSet<KType> from(KType... elements); @Override int hashKey(KType key); int indexOf(KType key); boolean indexExists(int index); KType indexGet(int index); KType indexReplace(int index, KType equivalentKey); void indexInsert(int index, KType key); @Override String visualizeKeyDistribution(int characters); public Object [] keys; }