Instance Method

isLessThanOrEqual(to:)

Returns a Boolean value that indicates whether the receiver is less than or equal to another given object.

Declaration

func isLessThanOrEqual(to object: Any?) -> Bool

Parameters

object

The object with which to compare the receiver.

Return Value

true if the receiver is less than or equal to object, otherwise false.

Discussion

During the evaluation of an NSWhoseSpecifier object that contains a test whose operator is NSLessThanOrEqualToComparison, an isLessThanOrEqual(to:) message may be sent to each potentially specified object, if the potentially specified object does not implement a scriptingIsLessThanOrEqual(to:) method and the object being tested against does not implement a scriptingIsGreaterThan(_:) method.

The default implementation for this method provided by NSObject method returns true if a compare: message sent to the same object would return NSOrderedAscending or NSOrderedSame.

See Also

Performing comparisons

func doesContain(Any) -> Bool

Returns a Boolean value that indicates whether the receiver contains a given object.

func isCaseInsensitiveLike(String) -> Bool

Returns a Boolean value that indicates whether receiver is considered to be “like” a given string when the case of characters in the receiver is ignored.

func isEqual(to: Any?) -> Bool

Returns a Boolean value that indicates whether the receiver is equal to another given object.

func isGreaterThan(Any?) -> Bool

Returns a Boolean value that indicates whether the receiver is greater than another given object.

func isGreaterThanOrEqual(to: Any?) -> Bool

Returns a Boolean value that indicates whether the receiver is greater than or equal to another given object.

func isLessThan(Any?) -> Bool

Returns a Boolean value that indicates whether the receiver is less than another given object.

func isLike(String) -> Bool

Returns a Boolean value that indicates whether the receiver is "like" another given object.

func isNotEqual(to: Any?) -> Bool

Returns a Boolean value that indicates whether the receiver is not equal to another given object.