interface MutableSet
source · line 17public
public interface MutableSet<T> : Set<T>
- Supertype
Set<T> - Inherited
operator fun contains(value: T): Boolean· Set<T> - Inherited
operator fun iterator(): Iterator<T>· Iterable<T> - Inherited
val size: Long· Collection<T>
A set supporting membership changes; add/remove report whether membership changed.
Extensions
public fun <T> MutableSet<T>.addAll(elements: Iterable<T>): Boolean· scoop:scoop.std:0.1.0public fun <T> MutableSet<T>.removeAll(elements: Iterable<T>): Boolean· scoop:scoop.std:0.1.0
type parameter T
source · line 17public
T
function clear
source · line 29public
public fun clear(): Unit
Removes all members.
function add
source · line 21public
public fun add(value: T): Boolean
Adds an absent member and returns true only when membership changes.
parameter value
source · line 21public
value: T
function remove
source · line 25public
public fun remove(value: T): Boolean
Removes a member and returns true only when it was present.
parameter value
source · line 25public
value: T
function retainAll
source · line 34public
public fun retainAll(elements: Iterable<T>): Boolean
Retains only members also present in the supplied elements and reports whether the set changed.
parameter elements
source · line 34public
elements: Iterable<T>