It's possible to prevent duplicated URL on Set
?
喜欢:
http://www.mywebsite.com/somethings
http://www.mywebsite.com/somethings/
URL come dynamically, so, I don't know what is the url that will come, it can come with and without bar on final. I need to add all url's on Set
preventing adding the same URL.
I know that bars on final make the URL different, but it's possible to prevent it on Set
?
private var urlList: MutableSet<URL> = mutableSetOf()
要么
private var urlList: MutableSet<String> = mutableSetOf()
It is Kotlin
, but sample in Java
are welcome.