SetBase
open class SetBase: ObjectBase
Base class for strongly-typed sets.
-
Construct a new set with a
size
of zero and specified initialcapacity
. A set can expand in size beyond its initial capacity, but best performance will be obtained if the initial capacity is close to the set’s maximum size.Declaration
Swift
public init(capacity: Int)
Parameters
capacity
Initial capacity.
-
Remove all values from this set.
Declaration
Swift
open func removeAll() -> Void
-
The number of values in this set.
Declaration
Swift
open var size: Int
-
Declaration
Swift
override open func toString() -> String
Return Value
A string representation of this object.
-
The underlying untyped set. Use with care, avoiding the addition of objects with an incorrect value type.
Declaration
Swift
open var untypedSet: UntypedSet