Class BasedHashSet<E>
java.lang.Object
com.gigaspaces.internal.utils.collections.BasedHashSet<E>
- All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>
- Direct Known Subclasses:
ConcurrentHashSet, CopyOnUpdateSet
-
Constructor Summary
ConstructorsConstructorDescriptionBasedHashSet(Map<E, Object> map) Constructs a new, empty set; the backing HashMap instance has default initial capacity (16) and load factor (0.75). -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds the specified element to this set if it is not already present.booleanaddAll(Collection<? extends E> c) voidclear()Removes all of the elements from this set.booleanReturns true if this set contains the specified element.booleancontainsAll(Collection<?> c) booleanisEmpty()Returns true if this set contains no elements.iterator()Returns an iterator over the elements in this set.booleanRemoves the specified element from this set if it is present.booleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Returns the number of elements in this set (its cardinality).Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface Set
equals, hashCode, spliterator
-
Constructor Details
-
BasedHashSet
-
-
Method Details
-
iterator
Returns an iterator over the elements in this set. The elements are returned in no particular order. -
size
-
isEmpty
-
contains
Returns true if this set contains the specified element. -
add
-
remove
Removes the specified element from this set if it is present. -
clear
-
addAll
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceSet<E>
-
removeAll
-
retainAll
-
toArray
-
toArray
-
toString
-