LegacyTagCollection
public final class LegacyTagCollection : Codable
extension LegacyTagCollection: CustomStringConvertible
Collection of Tag instances.
-
Contains true if the collection is empty
Declaration
Swift
public var isEmpty: Bool { get }
-
Number of tags in the collection
Declaration
Swift
public var count: Int { get }
-
Initialize new collection.
Declaration
Swift
public init(tags: [LegacyTag] = [])
Parameters
tags
collection to use
-
Obtain a Tag instance at the given index.
Declaration
Swift
public func getBy(index: Int) -> LegacyTag
Parameters
index
the collection index to get
Return Value
the Tag value
-
Add a new Tag to the collection
Declaration
Swift
public func append(_ tag: LegacyTag) -> Int
Parameters
tag
the Tag to add
Return Value
the position in the collection of the tag
-
Insert a tag in a given place in the collection.
Declaration
Swift
public func insert(_ tag: LegacyTag, at index: Int)
Parameters
tag
the Tag to insert
index
the location to insert it
-
Remove a tag from the collection.
Declaration
Swift
public func remove(at index: Int) -> LegacyTag
Parameters
index
the location to remove
Return Value
the Tag that was removed
-
Rename a tag.
Declaration
Swift
public func rename(_ index: Int, name: String)
Parameters
index
the index of the Tag to rename
name
the new name to use
-
Custom description string for the tag collection
Declaration
Swift
public var description: String { get }