iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
SCIComparableUtil
@interface SCIComparableUtil : NSObject
Defines helper class for works with ISCIComparable.
-
Checks if specified argument is defined.
Declaration
Objective-C
+ (BOOL)isDefinedByte:(char)arg;Swift
class func isDefinedByte(_ arg: CChar) -> BoolParameters
argThe argument to check.
Return Value
YES if argument value is defined.
-
Checks if specified argument is defined.
Declaration
Objective-C
+ (BOOL)isDefinedShort:(short)arg;Swift
class func isDefinedShort(_ arg: Int16) -> BoolParameters
argThe argument to check.
Return Value
YES if argument value is defined.
-
Checks if specified argument is defined.
Declaration
Objective-C
+ (BOOL)isDefinedInt:(int)arg;Swift
class func isDefinedInt(_ arg: Int32) -> BoolParameters
argThe argument to check.
Return Value
YES if argument value is defined.
-
Checks if specified argument is defined.
Declaration
Objective-C
+ (BOOL)isDefinedLong:(long)arg;Swift
class func isDefinedLong(_ arg: Int) -> BoolParameters
argThe argument to check.
Return Value
YES if argument value is defined.
-
Checks if specified argument is defined.
Declaration
Objective-C
+ (BOOL)isDefinedFloat:(float)arg;Swift
class func isDefinedFloat(_ arg: Float) -> BoolParameters
argThe argument to check.
Return Value
YES if argument value is defined.
-
Checks if specified argument is defined.
Declaration
Objective-C
+ (BOOL)isDefinedDouble:(double)arg;Swift
class func isDefinedDouble(_ arg: Double) -> BoolParameters
argThe argument to check.
Return Value
YES if argument value is defined.
-
Checks if specified argument is defined.
Declaration
Objective-C
+ (BOOL)isDefinedDate:(nonnull NSDate *)arg;Swift
class func isDefinedDate(_ arg: Date) -> BoolParameters
argThe argument to check.
Return Value
YES if argument value is defined.
-
Checks if specified double value can be converted to byte.
Declaration
Objective-C
+ (BOOL)canConvertToByte:(double)value;Swift
class func canConvert(toByte value: Double) -> BoolParameters
valueThe value to check.
Return Value
YES if value can be converted to byte.
-
Checks if specified double value can be converted to short.
Declaration
Objective-C
+ (BOOL)canConvertToShort:(double)value;Swift
class func canConvert(toShort value: Double) -> BoolParameters
valueThe value to check.
Return Value
YES if value can be converted to short.
-
Checks if specified double value can be converted to int.
Declaration
Objective-C
+ (BOOL)canConvertToInt:(double)value;Swift
class func canConvert(toInt value: Double) -> BoolParameters
valueThe value to check.
Return Value
YES if value can be converted to int.
-
Checks if specified double value can be converted to long.
Declaration
Objective-C
+ (BOOL)canConvertToLong:(double)value;Swift
class func canConvert(toLong value: Double) -> BoolParameters
valueThe value to check.
Return Value
YES if value can be converted to long.
-
Checks if specified double value can be converted to float.
Declaration
Objective-C
+ (BOOL)canConvertToFloat:(double)value;Swift
class func canConvert(toFloat value: Double) -> BoolParameters
valueThe value to check.
Return Value
YES if value can be converted to float.
-
Checks if specified double value can be converted to
NSDate.Declaration
Objective-C
+ (BOOL)canConvertToDate:(double)value;Swift
class func canConvert(toDate value: Double) -> BoolParameters
valueThe value to check.
Return Value
YES if value can be converted to
NSDate. -
Converts comparable to its double representation.
Declaration
Objective-C
+ (double)toDouble:(nonnull id<ISCIComparable>)comparable;Swift
class func toDouble(_ comparable: any ISCIComparable) -> DoubleParameters
comparableThe comparable to convert.
Return Value
The double representation of the value.
-
Converts comparable to its
NSDaterepresentation.Declaration
Objective-C
+ (nonnull NSDate *)toDate:(nullable id<ISCIComparable>)comparable;Swift
class func toDate(_ comparable: (any ISCIComparable)?) -> DateParameters
comparableThe comparable to convert.
Return Value
The Date representation of the value.
-
Checks if specified argument is defined.
Declaration
Objective-C
+ (BOOL)isDefined:(nullable id<ISCIComparable>)comparable;Swift
class func isDefined(_ comparable: (any ISCIComparable)?) -> BoolParameters
comparableThe argument to check.
Return Value
YES if argument value is defined.
-
Converts double value to specified Comparable type.
Declaration
Objective-C
+ (nullable id<ISCIComparable>)fromDouble:(double)rawDataValue type:(SCIDataType)type;Swift
class func fromDouble(_ rawDataValue: Double, type: SCIDataType) -> (any ISCIComparable)?Parameters
rawDataValueThe double value to convert.
typeThe type of target to convert to.
Return Value
The converted value.
-
Gets smaller of two
ISCIComparablevalues.Declaration
Objective-C
+ (nonnull id<ISCIComparable>)min:(nonnull id<ISCIComparable>)value1 and:(nonnull id<ISCIComparable>)value2;Swift
class func min(_ value1: any ISCIComparable, and value2: any ISCIComparable) -> any ISCIComparableParameters
value1The first argument.
value2The second argument.
Return Value
The min value.
-
Gets bigger of two
ISCIComparablevalues.Declaration
Objective-C
+ (nonnull id<ISCIComparable>)max:(nonnull id<ISCIComparable>)value1 and:(nonnull id<ISCIComparable>)value2;Swift
class func max(_ value1: any ISCIComparable, and value2: any ISCIComparable) -> any ISCIComparableParameters
value1The first argument.
value2The second argument.
Return Value
The max value.
-
Compares two
ISCIComparablevalues.Declaration
Objective-C
+ (NSComparisonResult)compare:(nonnull id<ISCIComparable>)a and:(nonnull id<ISCIComparable>)b;Swift
class func compare(_ a: any ISCIComparable, and b: any ISCIComparable) -> ComparisonResultParameters
aThe first argument.
bThe second argument.
Return Value
NSOrderedAscendingif the value of aNumber is greater than the number object’s,NSOrderedSameif they’re equal, andNSOrderedDescendingif the value ofobjis less than the number object’s.
View on GitHub