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: Int8) -> Bool

    Parameters

    arg

    The 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) -> Bool

    Parameters

    arg

    The 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) -> Bool

    Parameters

    arg

    The 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) -> Bool

    Parameters

    arg

    The 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) -> Bool

    Parameters

    arg

    The 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) -> Bool

    Parameters

    arg

    The argument to check.

    Return Value

    YES if argument value is defined.

  • Checks if specified argument is defined.

    Declaration

    Objective-C

    + (BOOL)isDefinedDate:(NSDate *)arg;

    Swift

    class func isDefinedDate(_ arg: Date!) -> Bool

    Parameters

    arg

    The 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) -> Bool

    Parameters

    value

    The 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) -> Bool

    Parameters

    value

    The 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) -> Bool

    Parameters

    value

    The 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) -> Bool

    Parameters

    value

    The 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) -> Bool

    Parameters

    value

    The 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) -> Bool

    Parameters

    value

    The value to check.

    Return Value

    YES if value can be converted to NSDate.

  • Converts comparable to its double representation.

    Declaration

    Objective-C

    + (double)toDouble:(id<ISCIComparable>)comparable;

    Swift

    class func toDouble(_ comparable: ISCIComparable!) -> Double

    Parameters

    comparable

    The comparable to convert.

    Return Value

    The double representation of the value.

  • Converts comparable to its NSDate representation.

    Declaration

    Objective-C

    + (NSDate *)toDate:(id<ISCIComparable>)comparable;

    Swift

    class func toDate(_ comparable: ISCIComparable!) -> Date!

    Parameters

    comparable

    The comparable to convert.

    Return Value

    The {@link Date} representation of the value.

  • Checks if specified argument is defined.

    Declaration

    Objective-C

    + (BOOL)isDefined:(id<ISCIComparable>)comparable;

    Swift

    class func isDefined(_ comparable: ISCIComparable!) -> Bool

    Parameters

    comparable

    The argument to check.

    Return Value

    YES if argument value is defined.

  • Converts double value to specified Comparable type.

    Declaration

    Objective-C

    + (id<ISCIComparable>)fromDouble:(double)rawDataValue type:(SCIDataType)type;

    Swift

    class func fromDouble(_ rawDataValue: Double, type: SCIDataType) -> ISCIComparable!

    Parameters

    rawDataValue

    The double value to convert.

    type

    The type of target to convert to.

    Return Value

    The converted value.

  • Gets smaller of two ISCIComparable values.

    Declaration

    Objective-C

    + (id<ISCIComparable>)min:(id<ISCIComparable>)value1
                          and:(id<ISCIComparable>)value2;

    Swift

    class func min(_ value1: ISCIComparable!, and value2: ISCIComparable!) -> ISCIComparable!

    Parameters

    value1

    The first argument.

    value2

    The second argument.

    Return Value

    The min value.

  • Gets bigger of two ISCIComparable values.

    Declaration

    Objective-C

    + (id<ISCIComparable>)max:(id<ISCIComparable>)value1
                          and:(id<ISCIComparable>)value2;

    Swift

    class func max(_ value1: ISCIComparable!, and value2: ISCIComparable!) -> ISCIComparable!

    Parameters

    value1

    The first argument.

    value2

    The second argument.

    Return Value

    The max value.

  • Compares two ISCIComparable values.

    Declaration

    Objective-C

    + (NSComparisonResult)compare:(id<ISCIComparable>)a and:(id<ISCIComparable>)b;

    Swift

    class func compare(_ a: ISCIComparable!, and b: ISCIComparable!) -> ComparisonResult

    Parameters

    a

    The first argument.

    b

    The second argument.

    Return Value

    NSOrderedAscending if the value of aNumber is greater than the number object’s, NSOrderedSame if they’re equal, and NSOrderedDescending if the value of obj is less than the number object’s.