Bool

struct Bool

A value type whose instances are either true or false.

Inheritance BooleanLiteralConvertible, BooleanType, Equatable, Hashable, Printable, Reflectable View Protocol Hierarchy →
Import import Swift

Initializers

init()

Default-initialize Boolean value to false.

Declaration

init()
init(_:)

Construct an instance representing the same logical value as value

Declaration

init<T : BooleanType>(_ value: T)
init(_builtinBooleanLiteral:)

Declaration

init(_builtinBooleanLiteral value: Builtin.Int1)
init(booleanLiteral:)

Create an instance initialized to value.

Declaration

init(booleanLiteral value: Bool)

Instance Variables

var boolValue: Bool

Identical to self.

Declaration

var boolValue: Bool { get }
var description: String

A textual representation of self.

Declaration

var description: String { get }
var hashValue: Int

The hash value.

Axiom: x == y implies x.hashValue == y.hashValue

Note: the hash value is not guaranteed to be stable across different invocations of the same program. Do not persist the hash value across program runs.

Declaration

var hashValue: Int { get }

Instance Methods

func getMirror()

Returns a mirror that reflects self.

Declaration

func getMirror() -> MirrorType