Instance Method インスタンスメソッド

isLessThan(_:)

Returns a Boolean value that indicates whether the receiver is less than another given object. レシーバが別の与えられたオブジェクトより小さいかどうかを指し示すブール値を返します。

Declaration 宣言

func isLessThan(_ object: Any?) -> Bool

Parameters パラメータ

object

The object with which to compare the receiver.

Return Value 戻り値

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

Discussion 解説

During the evaluation of an NSWhoseSpecifier object that contains a test whose operator is NSLessThanComparison, an isLessThan(_:) message may be sent to each potentially specified object, if the potentially specified object does not implement a scriptingIsLessThan(_:) method and the object being tested against does not implement a scriptingIsGreaterThanOrEqual(to:) 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.

See Also 参照

Performing comparisons 比較を実行する