NSDecimalNumber
************* NSDecimalNumber: the class **********
class NSDecimalNumber
************* NSDecimalNumber: the class **********
class NSDecimalNumber
import Foundation
class NSNumber
protocol Comparable : Equatable
A type that can be compared using the relational operators <
, <=
, >=
, and >
.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol ExpressibleByBooleanLiteral
A type that can be initialized with the Boolean literals true
and false
.
protocol ExpressibleByFloatLiteral
A type that can be initialized with a floating-point literal.
protocol ExpressibleByIntegerLiteral
A type that can be initialized with an integer literal.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol NSCoding
The NSCoding
protocol declares the two methods that a class must implement so that instances of that class can be encoded and decoded. This capability provides the basis for archiving (where objects and other structures are stored on disk) and distribution (where objects are copied to different address spaces).
protocol NSCopying
The NSCopying
protocol declares a method for providing functional copies of an object. The exact meaning of “copy” can vary from class to class, but a copy must be a functionally independent object with values identical to the original at the time the copy was made.
protocol NSObjectProtocol : AnyObject
The NSObjectProtocol
groups methods that are fundamental to all Foundation objects.
protocol NSSecureCoding : NSCoding
Conforming to the NSSecureCoding
protocol indicates that an object handles encoding and decoding instances of itself in a manner that is robust against object substitution attacks.
protocol Sendable
required convenience init(booleanLiteral value: Bool)
required convenience init(bytes buffer: UnsafeRawPointer, objCType type: UnsafePointer<Int8>)
required init?(coder: NSCoder)
init(decimal dcm: Decimal)
required convenience init(floatLiteral value: Double)
required convenience init(integerLiteral value: Int)
convenience init(mantissa: UInt64, exponent: Int16, isNegative: Bool)
convenience init(string numberValue: String?)
convenience init(string numberValue: String?, locale: Any?)
init(value: Bool)
init(value: Double)
init(value: Float)
init(value: Int)
init(value: UInt)
init(value: Int8)
init(value: Int16)
init(value: Int32)
init(value: Int64)
init(value: UInt8)
init(value: UInt16)
init(value: UInt32)
init(value: UInt64)
class var defaultBehavior: any NSDecimalNumberBehaviors { get }
class var maximum: NSDecimalNumber { get }
class var minimum: NSDecimalNumber { get }
class var notANumber: NSDecimalNumber { get }
class var one: NSDecimalNumber { get }
class var zero: NSDecimalNumber { get }
override var boolValue: Bool { get }
override var description: String { get }
override var doubleValue: Double { get }
override var floatValue: Float { get }
override var int16Value: Int16 { get }
override var int32Value: Int32 { get }
override var int64Value: Int64 { get }
override var int8Value: Int8 { get }
override var intValue: Int { get }
override var objCType: UnsafePointer<Int8> { get }
override var uint16Value: UInt16 { get }
override var uint32Value: UInt32 { get }
override var uint64Value: UInt64 { get }
override var uint8Value: UInt8 { get }
override var uintValue: UInt { get }
func adding(_ other: NSDecimalNumber) -> NSDecimalNumber
func adding(_ other: NSDecimalNumber, withBehavior b: (any NSDecimalNumberBehaviors)?) -> NSDecimalNumber
override func compare(_ decimalNumber: NSNumber) -> ComparisonResult
override func description(withLocale locale: Locale?) -> String
func dividing(by other: NSDecimalNumber) -> NSDecimalNumber
func dividing(by other: NSDecimalNumber, withBehavior b: (any NSDecimalNumberBehaviors)?) -> NSDecimalNumber
override func isEqual(_ value: Any?) -> Bool
func multiplying(by other: NSDecimalNumber) -> NSDecimalNumber
func multiplying(by other: NSDecimalNumber, withBehavior b: (any NSDecimalNumberBehaviors)?) -> NSDecimalNumber
func multiplying(byPowerOf10 power: Int16) -> NSDecimalNumber
func multiplying(byPowerOf10 power: Int16, withBehavior b: (any NSDecimalNumberBehaviors)?) -> NSDecimalNumber
func raising(toPower power: Int) -> NSDecimalNumber
func raising(toPower power: Int, withBehavior b: (any NSDecimalNumberBehaviors)?) -> NSDecimalNumber
func rounding(accordingToBehavior b: (any NSDecimalNumberBehaviors)?) -> NSDecimalNumber
func subtracting(_ other: NSDecimalNumber) -> NSDecimalNumber
func subtracting(_ other: NSDecimalNumber, withBehavior b: (any NSDecimalNumberBehaviors)?) -> NSDecimalNumber
typealias CalculationError = Decimal.CalculationError
typealias RoundingMode = Decimal.RoundingMode