FMIceLinkUtility Class Reference

Inherits from NSObject
Declared in FMIceLinkUtility.h
FMIceLinkUtility.m

Overview

Utility methods.

+ cloneWithList:

Clones the specified list.

+ (NSMutableArray<id> *)cloneWithList:(NSMutableArray<id> *)list

Parameters

list

The list.

Discussion

Clones the specified list.

Declared In

FMIceLinkUtility.h

+ firstOrDefaultWithArray:

Gets the first element in the array or the default value if the array is null or empty.

+ (id)firstOrDefaultWithArray:(NSMutableArray *)array

Parameters

array

The array.

Discussion

Gets the first element in the array or the default value if the array is null or empty.

Declared In

FMIceLinkUtility.h

+ firstOrDefaultWithList:

Gets the first element in the list or the default value if the list is null or empty.

+ (id)firstOrDefaultWithList:(NSMutableArray<id> *)list

Parameters

list

The list.

Discussion

Gets the first element in the list or the default value if the list is null or empty.

Declared In

FMIceLinkUtility.h

+ formatDoubleAsPercent:decimalPlaces:

Formats a double as a percentage string.
+ (NSString *)formatDoubleAsPercent:(double)value decimalPlaces:(int)decimalPlaces

Parameters

value

The value.

decimalPlaces

The number of decimal places to include.

Discussion

Formats a double as a percentage string.

Declared In

FMIceLinkUtility.h

+ generateSynchronizationSource

Generates a synchronization source.
+ (long long)generateSynchronizationSource

Discussion

Generates a synchronization source.

Declared In

FMIceLinkUtility.h

+ generateTieBreaker

Generates a Connection Tie-breaker.

@return

+ (NSString *)generateTieBreaker

Discussion

Generates a Connection Tie-breaker.

@return

Declared In

FMIceLinkUtility.h

+ lastOrDefaultWithArray:

Gets the last element in the array or the default value if the array is null or empty.

+ (id)lastOrDefaultWithArray:(NSMutableArray *)array

Parameters

array

The array.

Discussion

Gets the last element in the array or the default value if the array is null or empty.

Declared In

FMIceLinkUtility.h

+ lastOrDefaultWithList:

Gets the last element in the list or the default value if the list is null or empty.

+ (id)lastOrDefaultWithList:(NSMutableArray<id> *)list

Parameters

list

The list.

Discussion

Gets the last element in the list or the default value if the list is null or empty.

Declared In

FMIceLinkUtility.h

+ toListWithArray:

Converts an array to a list.

+ (NSMutableArray<id> *)toListWithArray:(NSMutableArray *)array

Parameters

array

The array.

Discussion

Converts an array to a list.

Declared In

FMIceLinkUtility.h

+ treeFindLeavesWithRoot:childrenCallback:nodeCallback:

Enumerates over all nodes in the tree, invoking the callback for each one.

The generic to search.

+ (void)treeFindLeavesWithRoot:(id)root childrenCallback:(FMIceLinkFunction1<id,NSMutableArray*> *)childrenCallback nodeCallback:(FMIceLinkAction1<id> *)nodeCallback

Parameters

root

The root.

childrenCallback

The children callback.

nodeCallback

The node callback.

Discussion

Enumerates over all nodes in the tree, invoking the callback for each one.

The generic to search.

Declared In

FMIceLinkUtility.h

+ treeFindLeavesWithRoot:childrenCallbackBlock:nodeCallbackBlock:

Enumerates over all nodes in the tree, invoking the callback for each one.

The generic to search.

+ (void)treeFindLeavesWithRoot:(id)root childrenCallbackBlock:(NSMutableArray *( ^ ) ( id ))childrenCallbackBlock nodeCallbackBlock:(void ( ^ ) ( id ))nodeCallbackBlock

Parameters

root

The root.

childrenCallbackBlock

The children callback.

nodeCallbackBlock

The node callback.

Discussion

Enumerates over all nodes in the tree, invoking the callback for each one.

The generic to search.

Declared In

FMIceLinkUtility.h

+ treeFindLeavesWithRootAndChildrenCallbackBlockAndNodeCallbackBlock

Enumerates over all nodes in the tree, invoking the callback for each one.

The generic to search. @inlineparam root The root. @inlineparam childrenCallbackBlock The children callback. @inlineparam nodeCallbackBlock The node callback.

+ (void ( ^ ) ( id , NSMutableArray *( ^ ) ( id ) , void ( ^ ) ( id ) ))treeFindLeavesWithRootAndChildrenCallbackBlockAndNodeCallbackBlock

Discussion

Enumerates over all nodes in the tree, invoking the callback for each one.

The generic to search. @inlineparam root The root. @inlineparam childrenCallbackBlock The children callback. @inlineparam nodeCallbackBlock The node callback.

Declared In

FMIceLinkUtility.h

+ treeSearchWithRoot:childrenCallback:nodeCallback:

Enumerates over all nodes in the tree, invoking the callback for each one.

The generic to search.

+ (void)treeSearchWithRoot:(id)root childrenCallback:(FMIceLinkFunction1<id,NSMutableArray*> *)childrenCallback nodeCallback:(FMIceLinkAction1<id> *)nodeCallback

Parameters

root

The root.

childrenCallback

The children callback.

nodeCallback

The node callback.

Discussion

Enumerates over all nodes in the tree, invoking the callback for each one.

The generic to search.

Declared In

FMIceLinkUtility.h

+ treeSearchWithRoot:childrenCallbackBlock:nodeCallbackBlock:

Enumerates over all nodes in the tree, invoking the callback for each one.

The generic to search.

+ (void)treeSearchWithRoot:(id)root childrenCallbackBlock:(NSMutableArray *( ^ ) ( id ))childrenCallbackBlock nodeCallbackBlock:(void ( ^ ) ( id ))nodeCallbackBlock

Parameters

root

The root.

childrenCallbackBlock

The children callback.

nodeCallbackBlock

The node callback.

Discussion

Enumerates over all nodes in the tree, invoking the callback for each one.

The generic to search.

Declared In

FMIceLinkUtility.h

+ treeSearchWithRootAndChildrenCallbackBlockAndNodeCallbackBlock

Enumerates over all nodes in the tree, invoking the callback for each one.

The generic to search. @inlineparam root The root. @inlineparam childrenCallbackBlock The children callback. @inlineparam nodeCallbackBlock The node callback.

+ (void ( ^ ) ( id , NSMutableArray *( ^ ) ( id ) , void ( ^ ) ( id ) ))treeSearchWithRootAndChildrenCallbackBlockAndNodeCallbackBlock

Discussion

Enumerates over all nodes in the tree, invoking the callback for each one.

The generic to search. @inlineparam root The root. @inlineparam childrenCallbackBlock The children callback. @inlineparam nodeCallbackBlock The node callback.

Declared In

FMIceLinkUtility.h