Utility methods. More...
Instance Methods | |
| (instancetype) | - init |
Class Methods | |
| (NSMutableArray *) | + cloneIntArray: |
| Clones an array of int values. More... | |
| (NSMutableArray *) | + cloneLongArray: |
| Clones an array of long values. More... | |
| (NSMutableArray *) | + cloneStringArray: |
| Clones an array of string values. More... | |
| (NSMutableArray< id > *) | + cloneWithList: |
| Clones the specified list. More... | |
| (id) | + firstOrDefaultWithArray: |
| Gets the first element in the array or the default value if the array is null or empty. More... | |
| (id) | + firstOrDefaultWithList: |
| Gets the first element in the list or the default value if the list is null or empty. More... | |
| (NSString *) | + formatDoubleAsPercent:decimalPlaces: |
| Formats a double as a percentage string. More... | |
| (NSString *) | + generateId |
| Generates a globally unique identifier with no hyphens. More... | |
| (long long) | + generateSynchronizationSource |
| Generates a synchronization source. More... | |
| (NSString *) | + generateTieBreaker |
| Generates a tie-breaker. More... | |
| (int) | + getRtpSequenceNumberDeltaWithRtpSequenceNumber:lastRtpSequenceNumber: |
| Retrieves the difference between two RTP sequence numbers while accounting for overflow rollover. More... | |
| (long long) | + getRtpTimestampDeltaWithRtpTimestamp:lastRtpTimestamp: |
| Retrieves the difference between two RTP timestamps while accounting for overflow rollover. More... | |
| (id) | + lastOrDefaultWithArray: |
| Gets the last element in the array or the default value if the array is null or empty. More... | |
| (id) | + lastOrDefaultWithList: |
| Gets the last element in the list or the default value if the list is null or empty. More... | |
| (bool) | + nullableLongEqualsWithLong1:long2: |
| Compares two nullable longs for equality. More... | |
| (id) | + singleOrDefaultWithArray: |
| Gets the only element in the array or the default value if the array is null or does not have exactly one value. More... | |
| (id) | + singleOrDefaultWithList: |
| Gets the only element in the list or the default value if the list is null or does not have exactly one value. More... | |
| (NSMutableArray *) | + spliceWithArray:index:addItems:createArray: |
| Splices an array. More... | |
| (NSMutableArray *) | + spliceWithArray:index:addItems:createArrayBlock: |
| Splices an array. More... | |
| (NSMutableArray *) | + spliceWithArray:index:removeCount:addItems:createArray: |
| Splices an array. More... | |
| (NSMutableArray *) | + spliceWithArray:index:removeCount:addItems:createArrayBlock: |
| Splices an array. More... | |
| (NSMutableArray *) | + spliceWithArray:index:removeCount:createArray: |
| Splices an array. More... | |
| (NSMutableArray *) | + spliceWithArray:index:removeCount:createArrayBlock: |
| Splices an array. More... | |
| (int) | + spliceWithArrayAndIndexAndAddItemsAndCreateArrayBlock |
| Splices an array. More... | |
| (int) | + spliceWithArrayAndIndexAndRemoveCountAndAddItemsAndCreateArrayBlock |
| Splices an array. More... | |
| (int) | + spliceWithArrayAndIndexAndRemoveCountAndCreateArrayBlock |
| Splices an array. More... | |
| (NSMutableArray *) | + toIntArrayWithIntList: |
| Converts a list of int values to an array of int values. More... | |
| (NSMutableArray< id > *) | + toListWithArray: |
| Converts an array to a list. More... | |
| (NSMutableArray *) | + toLongArrayWithLongList: |
| Converts a list of long values to an array of long values. More... | |
| (NSMutableArray *) | + toStringArrayWithStringList: |
| Converts a list of string values to an array of string values. More... | |
| (void) | + treeFindLeavesWithRoot:childrenCallback:nodeCallback: |
| Enumerates over all nodes in the tree, invoking the callback for each one. More... | |
| (void) | + treeFindLeavesWithRoot:childrenCallbackBlock:nodeCallbackBlock: |
| Enumerates over all nodes in the tree, invoking the callback for each one. More... | |
| (id) | + treeFindLeavesWithRootAndChildrenCallbackBlockAndNodeCallbackBlock |
| Enumerates over all nodes in the tree, invoking the callback for each one. More... | |
| (void) | + treeSearchWithRoot:childrenCallback:nodeCallback: |
| Enumerates over all nodes in the tree, invoking the callback for each one. More... | |
| (void) | + treeSearchWithRoot:childrenCallbackBlock:nodeCallbackBlock: |
| Enumerates over all nodes in the tree, invoking the callback for each one. More... | |
| (id) | + treeSearchWithRootAndChildrenCallbackBlockAndNodeCallbackBlock |
| Enumerates over all nodes in the tree, invoking the callback for each one. More... | |
| (FMLiveSwitchUtility *) | + utility |
Utility methods.
| + (NSMutableArray*) cloneIntArray: | (NSMutableArray *) | intArray |
Clones an array of int values.
| intArray | An array of int values. |
| + (NSMutableArray*) cloneLongArray: | (NSMutableArray *) | longArray |
Clones an array of long values.
| longArray | An array of long values. |
| + (NSMutableArray*) cloneStringArray: | (NSMutableArray *) | stringArray |
Clones an array of string values.
| stringArray | An array of string values. |
Clones the specified list.
| list | The list. |
| + (id) firstOrDefaultWithArray: | (NSMutableArray *) | array |
Gets the first element in the array or the default value if the array is null or empty.
| array | The array. |
Gets the first element in the list or the default value if the list is null or empty.
| list | The list. |
| + (NSString*) formatDoubleAsPercent: | (double) | value | |
| decimalPlaces: | (int) | decimalPlaces | |
Formats a double as a percentage string.
| value | The value. |
| decimalPlaces | The number of decimal places to include. |
| + (NSString*) generateId |
Generates a globally unique identifier with no hyphens.
| + (long long) generateSynchronizationSource |
Generates a synchronization source.
| + (NSString*) generateTieBreaker |
| + (int) getRtpSequenceNumberDeltaWithRtpSequenceNumber: | (int) | rtpSequenceNumber | |
| lastRtpSequenceNumber: | (int) | lastRtpSequenceNumber | |
Retrieves the difference between two RTP sequence numbers while accounting for overflow rollover.
| rtpSequenceNumber | The current RTP sequence number. |
| lastRtpSequenceNumber | The last (previous) RTP sequence number. |
| + (long long) getRtpTimestampDeltaWithRtpTimestamp: | (long long) | rtpTimestamp | |
| lastRtpTimestamp: | (long long) | lastRtpTimestamp | |
Retrieves the difference between two RTP timestamps while accounting for overflow rollover.
| rtpTimestamp | The current RTP timestamp. |
| lastRtpTimestamp | The last (previous) RTP timestamp. |
| - (instancetype) init |
| + (id) lastOrDefaultWithArray: | (NSMutableArray *) | array |
Gets the last element in the array or the default value if the array is null or empty.
| array | The array. |
Gets the last element in the list or the default value if the list is null or empty.
| list | The list. |
| + (bool) nullableLongEqualsWithLong1: | (FMLiveSwitchNullableLong *) | long1 | |
| long2: | (FMLiveSwitchNullableLong *) | long2 | |
Compares two nullable longs for equality.
| long1 | The first long value. |
| long2 | The second long value. |
| + (id) singleOrDefaultWithArray: | (NSMutableArray *) | array |
Gets the only element in the array or the default value if the array is null or does not have exactly one value.
| array | The array. |
Gets the only element in the list or the default value if the list is null or does not have exactly one value.
| list | The list. |
| + (NSMutableArray*) spliceWithArray: | (NSMutableArray *) | array | |
| index: | (int) | index | |
| addItems: | (NSMutableArray *) | addItems | |
| createArray: | (FMLiveSwitchFunction1< id, NSMutableArray * > *) | createArray | |
Splices an array.
| array | The array. |
| index | The splice index. |
| addItems | The items to add. |
| createArray | A function that creates an array of the given size. |
| + (NSMutableArray*) spliceWithArray: | (NSMutableArray *) | array | |
| index: | (int) | index | |
| addItems: | (NSMutableArray *) | addItems | |
| createArrayBlock: | (NSMutableArray *(^)(int)) | createArrayBlock | |
Splices an array.
| array | The array. |
| index | The splice index. |
| addItems | The items to add. |
| createArrayBlock | A function that creates an array of the given size. |
| + (NSMutableArray*) spliceWithArray: | (NSMutableArray *) | array | |
| index: | (int) | index | |
| removeCount: | (int) | removeCount | |
| addItems: | (NSMutableArray *) | addItems | |
| createArray: | (FMLiveSwitchFunction1< id, NSMutableArray * > *) | createArray | |
Splices an array.
| array | The array. |
| index | The splice index. |
| removeCount | The number of items to remove. |
| addItems | The items to add. |
| createArray | A function that creates an array of the given size. |
| + (NSMutableArray*) spliceWithArray: | (NSMutableArray *) | array | |
| index: | (int) | index | |
| removeCount: | (int) | removeCount | |
| addItems: | (NSMutableArray *) | addItems | |
| createArrayBlock: | (NSMutableArray *(^)(int)) | createArrayBlock | |
Splices an array.
| array | The array. |
| index | The splice index. |
| removeCount | The number of items to remove. |
| addItems | The items to add. |
| createArrayBlock | A function that creates an array of the given size. |
| + (NSMutableArray*) spliceWithArray: | (NSMutableArray *) | array | |
| index: | (int) | index | |
| removeCount: | (int) | removeCount | |
| createArray: | (FMLiveSwitchFunction1< id, NSMutableArray * > *) | createArray | |
Splices an array.
| array | The array. |
| index | The splice index. |
| removeCount | The number of items to remove. |
| createArray | A function that creates an array of the given size. |
| + (NSMutableArray*) spliceWithArray: | (NSMutableArray *) | array | |
| index: | (int) | index | |
| removeCount: | (int) | removeCount | |
| createArrayBlock: | (NSMutableArray *(^)(int)) | createArrayBlock | |
Splices an array.
| array | The array. |
| index | The splice index. |
| removeCount | The number of items to remove. |
| createArrayBlock | A function that creates an array of the given size. |
| + (int) spliceWithArrayAndIndexAndAddItemsAndCreateArrayBlock |
Splices an array.
@inlineparam array The array. @inlineparam index The splice index. @inlineparam addItems The items to add. @inlineparam createArrayBlock A function that creates an array of the given size.
| + (int) spliceWithArrayAndIndexAndRemoveCountAndAddItemsAndCreateArrayBlock |
Splices an array.
@inlineparam array The array. @inlineparam index The splice index. @inlineparam removeCount The number of items to remove. @inlineparam addItems The items to add. @inlineparam createArrayBlock A function that creates an array of the given size.
| + (int) spliceWithArrayAndIndexAndRemoveCountAndCreateArrayBlock |
Splices an array.
@inlineparam array The array. @inlineparam index The splice index. @inlineparam removeCount The number of items to remove. @inlineparam createArrayBlock A function that creates an array of the given size.
| + (NSMutableArray*) toIntArrayWithIntList: | (NSMutableArray< id > *) | intList |
Converts a list of int values to an array of int values.
| intList | A list of int values. |
| + (NSMutableArray<id>*) toListWithArray: | (NSMutableArray *) | array |
Converts an array to a list.
| array | The array. |
| + (NSMutableArray*) toLongArrayWithLongList: | (NSMutableArray< id > *) | longList |
Converts a list of long values to an array of long values.
| longList | A list of long values. |
| + (NSMutableArray*) toStringArrayWithStringList: | (NSMutableArray< NSString * > *) | stringList |
Converts a list of string values to an array of string values.
| stringList | A list of string values. |
| + (void) treeFindLeavesWithRoot: | (id) | root | |
| childrenCallback: | (FMLiveSwitchFunction1< id, NSMutableArray * > *) | childrenCallback | |
| nodeCallback: | (FMLiveSwitchAction1< id > *) | nodeCallback | |
Enumerates over all nodes in the tree, invoking the callback for each one.
| root | The root. |
| childrenCallback | The children callback. |
| nodeCallback | The node callback. |
| + (void) treeFindLeavesWithRoot: | (id) | root | |
| childrenCallbackBlock: | (NSMutableArray *(^)(id)) | childrenCallbackBlock | |
| nodeCallbackBlock: | (void(^)(id)) | nodeCallbackBlock | |
Enumerates over all nodes in the tree, invoking the callback for each one.
| root | The root. |
| childrenCallbackBlock | The children callback. |
| nodeCallbackBlock | The node callback. |
| + (id) treeFindLeavesWithRootAndChildrenCallbackBlockAndNodeCallbackBlock |
Enumerates over all nodes in the tree, invoking the callback for each one.
@inlineparam root The root. @inlineparam childrenCallbackBlock The children callback. @inlineparam nodeCallbackBlock The node callback.
| + (void) treeSearchWithRoot: | (id) | root | |
| childrenCallback: | (FMLiveSwitchFunction1< id, NSMutableArray * > *) | childrenCallback | |
| nodeCallback: | (FMLiveSwitchAction1< id > *) | nodeCallback | |
Enumerates over all nodes in the tree, invoking the callback for each one.
| root | The root. |
| childrenCallback | The children callback. |
| nodeCallback | The node callback. |
| + (void) treeSearchWithRoot: | (id) | root | |
| childrenCallbackBlock: | (NSMutableArray *(^)(id)) | childrenCallbackBlock | |
| nodeCallbackBlock: | (void(^)(id)) | nodeCallbackBlock | |
Enumerates over all nodes in the tree, invoking the callback for each one.
| root | The root. |
| childrenCallbackBlock | The children callback. |
| nodeCallbackBlock | The node callback. |
| + (id) treeSearchWithRootAndChildrenCallbackBlockAndNodeCallbackBlock |
Enumerates over all nodes in the tree, invoking the callback for each one.
@inlineparam root The root. @inlineparam childrenCallbackBlock The children callback. @inlineparam nodeCallbackBlock The node callback.
| + (FMLiveSwitchUtility*) utility |