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 (and not less than) the set’s maximum size.Declaration
Swift
public init(capacity: Int)
Parameters
capacity
Initial capacity.
-
true
if this set contains no values.Declaration
Swift
open var isEmpty: Bool { get }
-
Remove all values from this set.
Declaration
Swift
open func removeAll()
-
The number of values in this set.
Declaration
Swift
open var size: Int { get }
-
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 { get }