-
-
Save OwloneDev/fba5f15aa0ae81188a6c74ab4e1447c1 to your computer and use it in GitHub Desktop.
Add ArrayList to HashSet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun HashSet<String>.add(list: ArrayList<*>) { | |
for (i in list) this.add(i) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val set = HashSet<String>() | |
val list = ArrayList<*>() | |
set.add(list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment