Functions

The following functions are available globally.

  • Static global function for comparing equality between any two objects.

    This function will return true if:

    1. Both objects are nil
    2. The objects both conform to NSObjectProtocol and the isEqual() function returns true.
    3. The left-hand object conforms to RSDObjectProtocol and the isEqual() function returns true.

    Declaration

    Swift

    public func RSDObjectEquality(_ objA: Any?, _ objB: Any?) -> Bool
  • Static global function for getting the hash value for any object.

    1. If the object conforms to NSObjectProtocol, then hash will be returned.
    2. If the object casts to AnyHashable, then the hashValue will be returned.
    3. If the object conforms to RSDObjectProtocol, then the hashValue will be returned.

    Declaration

    Swift

    public func RSDObjectHash(_ obj: Any?) -> Int