← Docs
kotlin-stdlib / kotlin.collections / hashSetOf

hashSetOf

Common
JVM
JS
Native
1.1
fun < T > hashSetOf ( ) : HashSet < T >
(source)

Returns an empty new HashSet .

Common
JVM
JS
Native
1.0
fun < T > hashSetOf ( vararg elements : T ) : HashSet < T >
(source)

Returns a new HashSet with the given elements.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .