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;

    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;

    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;

    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;

    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;

    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;

    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:(nonnull NSDate *)arg;

    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;

    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;

    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;

    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;

    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;

    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;

    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:(nonnull id<ISCIComparable>)comparable;

    Parameters

    comparable

    The comparable to convert.

    Return Value

    The double representation of the value.

  • Converts comparable to its NSDate representation.

    Declaration

    Objective-C

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

    Parameters

    comparable

    The 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;

    Parameters

    comparable

    The 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;

    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

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

    Parameters

    value1

    The first argument.

    value2

    The second argument.

    Return Value

    The min value.

  • Gets bigger of two ISCIComparable values.

    Declaration

    Objective-C

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

    Parameters

    value1

    The first argument.

    value2

    The second argument.

    Return Value

    The max value.

  • Compares two ISCIComparable values.

    Declaration

    Objective-C

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

    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.