Class HashSet

<!-- prettier-ignore-start -->

Represents a HashSet

Constructor Summary

Constructor Description
HashSet() Constructs a new HashMap.
HashSet(Collection) Construct a new HashSet by initializing the HashSet with the elements of the given collection.

Method Summary

Method Description
clone() Returns a shallow copy of this set.

Methods inherited from class Collection

add, add1, addAll, clear, contains, containsAll, getLength, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray

Methods inherited from class Object

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

Constructor Details

HashSet()

  • HashSet()
    • : Constructs a new HashMap.

HashSet(Collection)

  • HashSet(collection: Collection)
    • : Construct a new HashSet by initializing the HashSet with the elements of the given collection.

      Parameters:

      • collection - the collection to add to the set.

Method Details

clone()

  • clone(): HashSet
    • : Returns a shallow copy of this set.

      Returns:

      • a shallow copy of this set.

<!-- prettier-ignore-end -->