NoteNumberRepresentable

public protocol NoteNumberRepresentable:
    NewType,
    Hashable,
    Comparable,
    SignedNumeric,
    ExpressibleByFloatLiteral

Protocol defining values representable by a NoteNumber.

  • The NoteNumber representation of the instance of NoteNumberRepresentable type.

    Declaration

    Swift

    var value: NoteNumber { get }
  • init(_:) Default implementation

    Create a NoteNumberRepresentable value with given NoteNumber.

    Default Implementation

    Creates a NoteNumberRepresentable-conforming type value with the given Double value.

    Creates a NoteNumberRepresentable-conforming type value with another.

    Declaration

    Swift

    init(_ noteNumber: NoteNumber)
  • hash(into:) Extension method

    Declaration

    Swift

    public func hash(into hasher: inout Hasher)

    Return Value

    The hash value of a NoteNumberRepresentable type.

  • ==(_:_:) Extension method

    Declaration

    Swift

    public static func == (lhs: Self, rhs: Self) -> Bool

    Return Value

    true if both values are representable by the same NoteNumber. Otherwise, false.

  • <(_:_:) Extension method

    Declaration

    Swift

    public static func < (lhs: Self, rhs: Self) -> Bool

    Return Value

    true if the first value is less than the second value. Otherwise, false.

  • init(floatLiteral:) Extension method

    Creates a NoteNumberRepresentable-conforming type with the given float literal.

    Declaration

    Swift

    public init(floatLiteral value: Double)
  • init(integerLiteral:) Extension method

    Creates a NoteNumberRepresentable-conforming type with the given integer literal.

    Declaration

    Swift

    public init(integerLiteral value: Int)
  • magnitude Extension method

    Declaration

    Swift

    public var magnitude: NoteNumber.Magnitude { get }

    Return Value

    The magnitude of this NoteNumberRepresentable-conforming type value.

  • +(_:_:) Extension method

    Declaration

    Swift

    public static func + (lhs: Self, rhs: Self) -> Self

    Return Value

    The sum of the two given NoteNumberRepresentable-conforming type values.

  • +=(_:_:) Extension method

    Declaration

    Swift

    public static func += (lhs: inout Self, rhs: Self)

    Return Value

    Adds the right-hand-side value to the left-hand-side value.

  • -(_:_:) Extension method

    Declaration

    Swift

    public static func - (lhs: Self, rhs: Self) -> Self

    Return Value

    The difference between the left-hand-side value and the right-hand-side value.

  • -=(_:_:) Extension method

    Declaration

    Swift

    public static func -= (lhs: inout Self, rhs: Self)

    Return Value

    Subtracts the right-hand-side value from the left-hand-side value.

  • *(_:_:) Extension method

    Declaration

    Swift

    public static func * (lhs: Self, rhs: Self) -> Self

    Return Value

    The product of the left-hand-side value and the right-hand-side value.

  • *=(_:_:) Extension method

    Declaration

    Swift

    public static func *= (lhs: inout Self, rhs: Self)

    Return Value

    Multiplies the right-hand-side value by the left-hand-side value.

  • init(exactly:) Extension method

    Creates a NoteNumberRepresentable-conforming type value with the given source value.

    Declaration

    Swift

    public init?<T>(exactly source: T) where T : BinaryInteger