E
- the type of elements maintained by this set
Serializable
, Cloneable
, Iterable<E>
, Collection<E>
, Set<E>
JobStateReasons
, LinkedHashSet
Constructors
Constructs a new, empty set; the backing HashMap
instance has default initial capacity (16) and load factor (0.75).
Constructs a new, empty set; the backing HashMap
instance has the specified initial capacity and default load factor (0.75).
HashSet(int initialCapacity, float loadFactor)
Constructs a new, empty set; the backing HashMap
instance has the specified initial capacity and the specified load factor.
Constructs a new set containing the elements in the specified collection.
boolean
Adds the specified element to this set if it is not already present.
void
Removes all of the elements from this set.
Returns a shallow copy of this HashSet
instance: the elements themselves are not cloned.
boolean
Returns true
if this set contains the specified element.
boolean
Returns true
if this set contains no elements.
Returns an iterator over the elements in this set.
Creates a new, empty HashSet suitable for the expected number of elements.
boolean
Removes the specified element from this set if it is present.
int
Returns the number of elements in this set (its cardinality).
Returns an array containing all of the elements in this collection.
<T> T[]
Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4