<!-- prettier-ignore-start -->
# Class HashSet

- [TopLevel.Object](TopLevel.Object.md)
  - [dw.util.Collection](dw.util.Collection.md)
    - [dw.util.Set](dw.util.Set.md)
      - [dw.util.HashSet](dw.util.HashSet.md)

Represents a HashSet


## Constructor Summary

| Constructor | Description |
| --- | --- |
| [HashSet](#hashset)() | Constructs a new HashMap. |
| [HashSet](#hashsetcollection)([Collection](dw.util.Collection.md)) | Construct a new HashSet by  initializing the HashSet with the elements of the  given collection. |

## Method Summary

| Method | Description |
| --- | --- |
| [clone](dw.util.HashSet.md#clone)() | Returns a shallow copy of this set. |

### Methods inherited from class Collection

[add](dw.util.Collection.md#addobject), [add1](dw.util.Collection.md#add1object), [addAll](dw.util.Collection.md#addallcollection), [clear](dw.util.Collection.md#clear), [contains](dw.util.Collection.md#containsobject), [containsAll](dw.util.Collection.md#containsallcollection), [getLength](dw.util.Collection.md#getlength), [isEmpty](dw.util.Collection.md#isempty), [iterator](dw.util.Collection.md#iterator), [remove](dw.util.Collection.md#removeobject), [removeAll](dw.util.Collection.md#removeallcollection), [retainAll](dw.util.Collection.md#retainallcollection), [size](dw.util.Collection.md#size), [toArray](dw.util.Collection.md#toarray), [toArray](dw.util.Collection.md#toarraynumber-number)
### Methods inherited from class Object

[assign](TopLevel.Object.md#assignobject-object), [create](TopLevel.Object.md#createobject), [create](TopLevel.Object.md#createobject-object), [defineProperties](TopLevel.Object.md#definepropertiesobject-object), [defineProperty](TopLevel.Object.md#definepropertyobject-object-object), [entries](TopLevel.Object.md#entriesobject), [freeze](TopLevel.Object.md#freezeobject), [fromEntries](TopLevel.Object.md#fromentriesiterable), [getOwnPropertyDescriptor](TopLevel.Object.md#getownpropertydescriptorobject-object), [getOwnPropertyNames](TopLevel.Object.md#getownpropertynamesobject), [getOwnPropertySymbols](TopLevel.Object.md#getownpropertysymbolsobject), [getPrototypeOf](TopLevel.Object.md#getprototypeofobject), [hasOwnProperty](TopLevel.Object.md#hasownpropertystring), [is](TopLevel.Object.md#isobject-object), [isExtensible](TopLevel.Object.md#isextensibleobject), [isFrozen](TopLevel.Object.md#isfrozenobject), [isPrototypeOf](TopLevel.Object.md#isprototypeofobject), [isSealed](TopLevel.Object.md#issealedobject), [keys](TopLevel.Object.md#keysobject), [preventExtensions](TopLevel.Object.md#preventextensionsobject), [propertyIsEnumerable](TopLevel.Object.md#propertyisenumerablestring), [seal](TopLevel.Object.md#sealobject), [setPrototypeOf](TopLevel.Object.md#setprototypeofobject-object), [toLocaleString](TopLevel.Object.md#tolocalestring), [toString](TopLevel.Object.md#tostring), [valueOf](TopLevel.Object.md#valueof), [values](TopLevel.Object.md#valuesobject)
## Constructor Details

### HashSet()
- HashSet()
  - : Constructs a new HashMap.


---

### HashSet(Collection)
- HashSet(collection: [Collection](dw.util.Collection.md))
  - : 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](dw.util.HashSet.md)
  - : Returns a shallow copy of this set.

    **Returns:**
    - a shallow copy of this set.


---

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