FMLiveSwitchCollection Class Reference

A collection of values. More...

Instance Methods

(void) - addMany:
 Adds some values. More...
 
(void) - addSuccess:
 Invoked when an element is added to the collection. More...
 
(void) - addSuccessNoLock:
 Invoked after an element is added to the collection. More...
 
(bool) - any
 Determined whether the collection contains at least one value. More...
 
(bool) - anyWithPredicate:
 Determined whether the collection contains at least one value that matches the specified predicate. More...
 
(T) - anyWithPredicateBlock
 Determined whether the collection contains at least one value that matches the specified predicate. More...
 
(bool) - anyWithPredicateBlock:
 Determined whether the collection contains at least one value that matches the specified predicate. More...
 
(NSMutableArray *) - arrayFromList:
 Creates an array from a list. More...
 
(bool) - contains:
 Determines whether the collection contains a value. More...
 
(int) - count
 Gets the count. More...
 
(TCollection) - createCollection
 Creates a collection. More...
 
(T) - first
 Gets the first value. More...
 
(T) - firstOrDefault
 Gets the first value. More...
 
(T) - firstOrDefaultWithPredicate:
 Gets the first value that matches the specified predicate. More...
 
(T) - firstOrDefaultWithPredicateBlock
 Gets the first value that matches the specified predicate. More...
 
(T) - firstOrDefaultWithPredicateBlock:
 Gets the first value that matches the specified predicate. More...
 
(T) - firstWithPredicate:
 Gets the first value that matches the specified predicate. More...
 
(T) - firstWithPredicateBlock
 Gets the first value that matches the specified predicate. More...
 
(T) - firstWithPredicateBlock:
 Gets the first value that matches the specified predicate. More...
 
(void) - forEachWithCallback:
 Executes a callback function once per value. More...
 
(T, int) - forEachWithCallbackBlock
 Executes a callback function once per value. More...
 
(void) - forEachWithCallbackBlock:
 Executes a callback function once per value. More...
 
(instancetype) - init
 Initializes a new instance of the FMLiveSwitchCollection`2 class. More...
 
(T) - last
 Gets the last value. More...
 
(T) - lastOrDefault
 Gets the last value. More...
 
(T) - lastOrDefaultWithPredicate:
 Gets the last value that matches the specified predicate. More...
 
(T) - lastOrDefaultWithPredicateBlock
 Gets the last value that matches the specified predicate. More...
 
(T) - lastOrDefaultWithPredicateBlock:
 Gets the last value that matches the specified predicate. More...
 
(T) - lastWithPredicate:
 Gets the last value that matches the specified predicate. More...
 
(T) - lastWithPredicateBlock
 Gets the last value that matches the specified predicate. More...
 
(T) - lastWithPredicateBlock:
 Gets the last value that matches the specified predicate. More...
 
(bool) - remove:
 Removes a value. More...
 
(void) - removeAll
 Removes all values. More...
 
(T) - removeFirst
 Removes the first value. More...
 
(T) - removeFirstWithCondition:
 Removes the first value that matches a given condition. More...
 
(T) - removeFirstWithConditionBlock
 Removes the first value that matches a given condition. More...
 
(T) - removeFirstWithConditionBlock:
 Removes the first value that matches a given condition. More...
 
(T) - removeLast
 Removes the last value. More...
 
(T) - removeLastWithCondition:
 Removes the last value that matches a given condition. More...
 
(T) - removeLastWithConditionBlock
 Removes the last value that matches a given condition. More...
 
(T) - removeLastWithConditionBlock:
 Removes the last value that matches a given condition. More...
 
(void) - removeMany:
 Removes some values. More...
 
(void) - removeSuccess:
 Invoked when an element is removed from the collection. More...
 
(void) - removeSuccessNoLock:
 Invoked after an element is removed from the collection. More...
 
(void) - replace:
 Replaces the collection with a new set of values. More...
 
(void) - setValue:
 Sets the value. More...
 
(void) - setValues:
 Sets the values. More...
 
(T) - single
 Gets the only value. More...
 
(T) - singleOrDefault
 Gets the only value. More...
 
(T) - singleOrDefaultWithPredicate:
 Gets the only value that matches the specified predicate. More...
 
(T) - singleOrDefaultWithPredicateBlock
 Gets the only value that matches the specified predicate. More...
 
(T) - singleOrDefaultWithPredicateBlock:
 Gets the only value that matches the specified predicate. More...
 
(T) - singleWithPredicate:
 Gets the only value that matches the specified predicate. More...
 
(T) - singleWithPredicateBlock
 Gets the only value that matches the specified predicate. More...
 
(T) - singleWithPredicateBlock:
 Gets the only value that matches the specified predicate. More...
 
(NSMutableArray *) - toArray
 Clones the values into a new array. More...
 
(T) - value
 Gets the value. More...
 
(T) - valueAtOrDefaultWithIndex:
 Gets the value at the specified index. More...
 
(T) - valueAtWithIndex:
 Gets the value at the specified index. More...
 
(NSMutableArray *) - values
 Gets the values. More...
 
(TCollection) - whereWithPredicate:
 Creates a new collection with values that match the specified predicate. More...
 
(T, int) - whereWithPredicateBlock
 Creates a new collection with values that match the specified predicate. More...
 
(TCollection) - whereWithPredicateBlock:
 Creates a new collection with values that match the specified predicate. More...
 

Class Methods

(FMLiveSwitchCollection *) + collection
 Initializes a new instance of the FMLiveSwitchCollection`2 class. More...
 

Protected Attributes

 __pad0__: NSObject- (bool) add:(T)value
 

Detailed Description

A collection of values.

Method Documentation

◆ addMany:

- (void) addMany: (NSMutableArray *)  values

Adds some values.

Parameters
valuesThe values.

◆ addSuccess:

- (void) addSuccess: (T)  value

Invoked when an element is added to the collection.

Parameters
valueThe value.

◆ addSuccessNoLock:

- (void) addSuccessNoLock: (T)  value

Invoked after an element is added to the collection.

Parameters
valueThe value.

◆ any

- (bool) any

Determined whether the collection contains at least one value.

◆ anyWithPredicate:

- (bool) anyWithPredicate: (FMLiveSwitchFunction1< T, id > *)  predicate

Determined whether the collection contains at least one value that matches the specified predicate.

Parameters
predicateThe predicate.

◆ anyWithPredicateBlock

- T anyWithPredicateBlock

Determined whether the collection contains at least one value that matches the specified predicate.

@inlineparam predicateBlock The predicate.

◆ anyWithPredicateBlock:

- (bool) anyWithPredicateBlock: (bool(^)(T))  predicateBlock

Determined whether the collection contains at least one value that matches the specified predicate.

Parameters
predicateBlockThe predicate.

◆ arrayFromList:

- (NSMutableArray*) arrayFromList: (NSMutableArray< T > *)  list

Creates an array from a list.

Parameters
listThe list.

◆ collection

+ (FMLiveSwitchCollection*) collection

Initializes a new instance of the FMLiveSwitchCollection`2 class.

◆ contains:

- (bool) contains: (T)  value

Determines whether the collection contains a value.

Parameters
valueThe value.

◆ count

- (int) count

Gets the count.

◆ createCollection

◆ first

- T first

Gets the first value.

Throws an exception if there are no values in the collection.

◆ firstOrDefault

- T firstOrDefault

Gets the first value.

Returns a default value if there are no values in the collection.

◆ firstOrDefaultWithPredicate:

- T firstOrDefaultWithPredicate: (FMLiveSwitchFunction1< T, id > *)  predicate

Gets the first value that matches the specified predicate.

Returns a default value if there are no such values in the collection.

Parameters
predicateThe predicate.

◆ firstOrDefaultWithPredicateBlock

- T firstOrDefaultWithPredicateBlock

Gets the first value that matches the specified predicate.

Returns a default value if there are no such values in the collection.

@inlineparam predicateBlock The predicate.

◆ firstOrDefaultWithPredicateBlock:

- T firstOrDefaultWithPredicateBlock: (bool(^)(T))  predicateBlock

Gets the first value that matches the specified predicate.

Returns a default value if there are no such values in the collection.

Parameters
predicateBlockThe predicate.

◆ firstWithPredicate:

- T firstWithPredicate: (FMLiveSwitchFunction1< T, id > *)  predicate

Gets the first value that matches the specified predicate.

Throws an exception if there are no such values in the collection.

Parameters
predicateThe predicate.

◆ firstWithPredicateBlock

- T firstWithPredicateBlock

Gets the first value that matches the specified predicate.

Throws an exception if there are no such values in the collection.

@inlineparam predicateBlock The predicate.

◆ firstWithPredicateBlock:

- T firstWithPredicateBlock: (bool(^)(T))  predicateBlock

Gets the first value that matches the specified predicate.

Throws an exception if there are no such values in the collection.

Parameters
predicateBlockThe predicate.

◆ forEachWithCallback:

- (void) forEachWithCallback: (FMLiveSwitchAction2< T, id > *)  callback

Executes a callback function once per value.

Parameters
callbackThe callback to execute.

◆ forEachWithCallbackBlock

- (T, int) forEachWithCallbackBlock

Executes a callback function once per value.

@inlineparam callbackBlock The callback to execute.

◆ forEachWithCallbackBlock:

- (void) forEachWithCallbackBlock: (void(^)(T, int))  callbackBlock

Executes a callback function once per value.

Parameters
callbackBlockThe callback to execute.

◆ init

◆ last

- T last

Gets the last value.

Throws an exception if there are no values in the collection.

◆ lastOrDefault

- T lastOrDefault

Gets the last value.

Returns a default value if there are no values in the collection.

◆ lastOrDefaultWithPredicate:

- T lastOrDefaultWithPredicate: (FMLiveSwitchFunction1< T, id > *)  predicate

Gets the last value that matches the specified predicate.

Returns a default value if there are no such values in the collection.

Parameters
predicateThe predicate.

◆ lastOrDefaultWithPredicateBlock

- T lastOrDefaultWithPredicateBlock

Gets the last value that matches the specified predicate.

Returns a default value if there are no such values in the collection.

@inlineparam predicateBlock The predicate.

◆ lastOrDefaultWithPredicateBlock:

- T lastOrDefaultWithPredicateBlock: (bool(^)(T))  predicateBlock

Gets the last value that matches the specified predicate.

Returns a default value if there are no such values in the collection.

Parameters
predicateBlockThe predicate.

◆ lastWithPredicate:

- T lastWithPredicate: (FMLiveSwitchFunction1< T, id > *)  predicate

Gets the last value that matches the specified predicate.

Throws an exception if there are no such values in the collection.

Parameters
predicateThe predicate.

◆ lastWithPredicateBlock

- T lastWithPredicateBlock

Gets the last value that matches the specified predicate.

Throws an exception if there are no such values in the collection.

@inlineparam predicateBlock The predicate.

◆ lastWithPredicateBlock:

- T lastWithPredicateBlock: (bool(^)(T))  predicateBlock

Gets the last value that matches the specified predicate.

Throws an exception if there are no such values in the collection.

Parameters
predicateBlockThe predicate.

◆ remove:

- (bool) remove: (T)  value

Removes a value.

Parameters
valueThe value.

◆ removeAll

- (void) removeAll

Removes all values.

◆ removeFirst

- T removeFirst

Removes the first value.

◆ removeFirstWithCondition:

- T removeFirstWithCondition: (FMLiveSwitchFunction1< T, id > *)  condition

Removes the first value that matches a given condition.

◆ removeFirstWithConditionBlock

- T removeFirstWithConditionBlock

Removes the first value that matches a given condition.

◆ removeFirstWithConditionBlock:

- T removeFirstWithConditionBlock: (bool(^)(T))  conditionBlock

Removes the first value that matches a given condition.

◆ removeLast

- T removeLast

Removes the last value.

◆ removeLastWithCondition:

- T removeLastWithCondition: (FMLiveSwitchFunction1< T, id > *)  condition

Removes the last value that matches a given condition.

◆ removeLastWithConditionBlock

- T removeLastWithConditionBlock

Removes the last value that matches a given condition.

◆ removeLastWithConditionBlock:

- T removeLastWithConditionBlock: (bool(^)(T))  conditionBlock

Removes the last value that matches a given condition.

◆ removeMany:

- (void) removeMany: (NSMutableArray *)  values

Removes some values.

Parameters
valuesThe values.

◆ removeSuccess:

- (void) removeSuccess: (T)  value

Invoked when an element is removed from the collection.

Parameters
valueThe value.

◆ removeSuccessNoLock:

- (void) removeSuccessNoLock: (T)  value

Invoked after an element is removed from the collection.

Parameters
valueThe value.

◆ replace:

- (void) replace: (NSMutableArray *)  values

Replaces the collection with a new set of values.

Parameters
valuesThe values.

◆ setValue:

- (void) setValue: (T)  value

Sets the value.

◆ setValues:

- (void) setValues: (NSMutableArray *)  value

Sets the values.

◆ single

- T single

Gets the only value.

Throws an exception if there are no values or more than one value in the collection.

◆ singleOrDefault

- T singleOrDefault

Gets the only value.

Returns a default value if there are no values or more than one value in the collection.

◆ singleOrDefaultWithPredicate:

- T singleOrDefaultWithPredicate: (FMLiveSwitchFunction1< T, id > *)  predicate

Gets the only value that matches the specified predicate.

Returns a default value if there are no values or more than one value in the collection.

◆ singleOrDefaultWithPredicateBlock

- T singleOrDefaultWithPredicateBlock

Gets the only value that matches the specified predicate.

Returns a default value if there are no values or more than one value in the collection.

◆ singleOrDefaultWithPredicateBlock:

- T singleOrDefaultWithPredicateBlock: (bool(^)(T))  predicateBlock

Gets the only value that matches the specified predicate.

Returns a default value if there are no values or more than one value in the collection.

◆ singleWithPredicate:

- T singleWithPredicate: (FMLiveSwitchFunction1< T, id > *)  predicate

Gets the only value that matches the specified predicate.

Throws an exception if there are no values or more than one value in the collection.

◆ singleWithPredicateBlock

- T singleWithPredicateBlock

Gets the only value that matches the specified predicate.

Throws an exception if there are no values or more than one value in the collection.

◆ singleWithPredicateBlock:

- T singleWithPredicateBlock: (bool(^)(T))  predicateBlock

Gets the only value that matches the specified predicate.

Throws an exception if there are no values or more than one value in the collection.

◆ toArray

- (NSMutableArray*) toArray

Clones the values into a new array.

◆ value

- T value

Gets the value.

◆ valueAtOrDefaultWithIndex:

- T valueAtOrDefaultWithIndex: (int)  index

Gets the value at the specified index.

Returns a default value if a value does not exist at that index.

Parameters
indexThe index.

◆ valueAtWithIndex:

- T valueAtWithIndex: (int)  index

Gets the value at the specified index.

Throws an exception if a value does not exist at that index.

Parameters
indexThe index.

◆ values

- (NSMutableArray*) values

Gets the values.

◆ whereWithPredicate:

- (TCollection) whereWithPredicate: (FMLiveSwitchFunction2< T, id, id > *)  predicate

Creates a new collection with values that match the specified predicate.

Parameters
predicateThe predicate.

◆ whereWithPredicateBlock

- (T, int) whereWithPredicateBlock

Creates a new collection with values that match the specified predicate.

@inlineparam predicateBlock The predicate.

◆ whereWithPredicateBlock:

- (TCollection) whereWithPredicateBlock: (bool(^)(T, int))  predicateBlock

Creates a new collection with values that match the specified predicate.

Parameters
predicateBlockThe predicate.

Member Data Documentation

◆ __pad0__

- __pad0__
protected