addIfNotExist

infix fun <E> ArrayList<E>.addIfNotExist(obj: E): Boolean

Adds E to this list if the same doesn't exist


infix fun <E> MutableList<E>.addIfNotExist(obj: E): Boolean

Adds E to this list if the same doesn't previously exist. so


fun <K, E> HashMap<K, E>.addIfNotExist(key: K, obj: E): E?
fun <K, E> MutableMap<K, E>.addIfNotExist(key: K, obj: E): E?

Adds E to this map if the same doesn't exist