-
Element count.
Declaration
Swift
var count: Int { get } -
All value keys.
Declaration
Swift
var keys: [String] { get } -
subscript(_:)Default implementationReturns an element for a specified
key.Default Implementation
Returns an element with a specified key sequence.
Returns an element with a specified key sequence.
Declaration
Swift
subscript(key: String) -> MarcoValue? { get set } -
Returns a key identifier for a specified
key.Declaration
Swift
func identifier(key: String) -> MarcoIdentifier? -
Removes an element with a specified
key.Declaration
Swift
@discardableResult func remove(for key: String) -> Bool
-
isEmptyExtension methodTrue if the object is empty.
Declaration
Swift
public var isEmpty: Bool { get } -
isNotEmptyExtension methodTrue if the object is not empty.
Declaration
Swift
public var isNotEmpty: Bool { get } -
elementsExtension methodReturns all elements. The new array instance will be created.
Declaration
Swift
public var elements: [String : MarcoValue] { get } -
forEach(_:)Extension methodIterates over all elements.
Declaration
Swift
public func forEach(_ body: (String, MarcoValue) throws -> ()) rethrows -
all(predicate:)Extension methodReturns
trueifpredicatereturnstruefor all elements.Declaration
Swift
public func all(predicate: (String, MarcoValue) throws -> Bool) rethrows -> Bool -
none(predicate:)Extension methodReturns
trueifpredicatereturnsfalsefor all elements.Declaration
Swift
public func none(predicate: (String, MarcoValue) throws -> Bool) rethrows -> Bool -
any(predicate:)Extension methodReturns
trueifpredicatereturnstrueat least for one element.Declaration
Swift
public func any(predicate: (String, MarcoValue) throws -> Bool) rethrows -> Bool -
sequence()Extension methodReturns a
Sequencerepresentation of the object.Declaration
Swift
public func sequence() -> MarcoObjectSequence -
accept(_:data:)Extension methodDeclaration
Swift
public func accept<V, D, R>(_ visitor: V, data: D) -> R where V : MarcoVisitor, D == V.Data, R == V.ReturnType
MarcoObject Protocol Reference