FMIceLinkCollection Class Reference

Inherits from NSObject
Conforms to T
TCollection
__covariant
Declared in FMIceLinkCollection.h
FMIceLinkCollection.m

Overview

A collection of [values](#//api/name/values).

– add:

Adds a [value](#//api/name/value).
- (bool)add:(T)value

Parameters

value

The value.

Discussion

Adds a [value](#//api/name/value).

Declared In

FMIceLinkCollection.h

– addMany:

Adds some [values](#//api/name/values).
- (bool)addMany:(NSMutableArray *)values

Parameters

values

The values.

Discussion

Adds some [values](#//api/name/values).

Declared In

FMIceLinkCollection.h

– addSuccess:

Invoked when an element is added to the [collection](#//api/name/collection).
- (void)addSuccess:(T)value

Parameters

value

The value.

Discussion

Invoked when an element is added to the [collection](#//api/name/collection).

Declared In

FMIceLinkCollection.h

– any

Determined whether the [collection](#//api/name/collection) contains at least one [value](#//api/name/value).
- (bool)any

Discussion

Determined whether the [collection](#//api/name/collection) contains at least one [value](#//api/name/value).

Declared In

FMIceLinkCollection.h

– anyWithPredicate:

Determined whether the [collection](#//api/name/collection) contains at least one [value](#//api/name/value) that matches the specified predicate.
- (bool)anyWithPredicate:(FMIceLinkFunction1<T,id> *)predicate

Parameters

predicate

The predicate.

Discussion

Determined whether the [collection](#//api/name/collection) contains at least one [value](#//api/name/value) that matches the specified predicate.

Declared In

FMIceLinkCollection.h

– anyWithPredicateBlock

Determined whether the [collection](#//api/name/collection) contains at least one [value](#//api/name/value) that matches the specified predicate.

@inlineparam predicateBlock The predicate.

- (bool ( ^ ) ( bool ( ^ ) ( T ) ))anyWithPredicateBlock

Discussion

Determined whether the [collection](#//api/name/collection) contains at least one [value](#//api/name/value) that matches the specified predicate.

@inlineparam predicateBlock The predicate.

Declared In

FMIceLinkCollection.h

– anyWithPredicateBlock:

Determined whether the [collection](#//api/name/collection) contains at least one [value](#//api/name/value) that matches the specified predicate.
- (bool)anyWithPredicateBlock:(bool ( ^ ) ( T ))predicateBlock

Parameters

predicateBlock

The predicate.

Discussion

Determined whether the [collection](#//api/name/collection) contains at least one [value](#//api/name/value) that matches the specified predicate.

Declared In

FMIceLinkCollection.h

– arrayFromList:

Creates an array from a list.
- (NSMutableArray *)arrayFromList:(NSMutableArray<T> *)list

Parameters

list

The list.

Discussion

Creates an array from a list.

Declared In

FMIceLinkCollection.h

– contains:

Determines whether the collection contains a [value](#//api/name/value).
- (bool)contains:(T)value

Parameters

value

The value.

Discussion

Determines whether the collection contains a [value](#//api/name/value).

Declared In

FMIceLinkCollection.h

– count

Gets the count.
- (int)count

Discussion

Gets the count.

Declared In

FMIceLinkCollection.h

– createCollection

Creates a collection.
- (TCollection)createCollection

Discussion

Creates a collection.

Declared In

FMIceLinkCollection.h

– first

Gets the first [value](#//api/name/value). Throws an exception if there are no [values](#//api/name/values) in the collection.
- (T)first

Discussion

Gets the first [value](#//api/name/value). Throws an exception if there are no [values](#//api/name/values) in the collection.

Declared In

FMIceLinkCollection.h

– firstOrDefault

Gets the [first](#//api/name/first) [value](#//api/name/value). Returns a default [value](#//api/name/value) if there are no [values](#//api/name/values) in the collection.
- (T)firstOrDefault

Discussion

Gets the [first](#//api/name/first) [value](#//api/name/value). Returns a default [value](#//api/name/value) if there are no [values](#//api/name/values) in the collection.

Declared In

FMIceLinkCollection.h

– firstOrDefaultWithPredicate:

Gets the [first](#//api/name/first) [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no such [values](#//api/name/values) in the collection.
- (T)firstOrDefaultWithPredicate:(FMIceLinkFunction1<T,id> *)predicate

Parameters

predicate

The predicate.

Discussion

Gets the [first](#//api/name/first) [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no such [values](#//api/name/values) in the collection.

Declared In

FMIceLinkCollection.h

– firstOrDefaultWithPredicateBlock

Gets the [first](#//api/name/first) [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no such [values](#//api/name/values) in the collection.

@inlineparam predicateBlock The predicate.

- (T ( ^ ) ( bool ( ^ ) ( T ) ))firstOrDefaultWithPredicateBlock

Discussion

Gets the [first](#//api/name/first) [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no such [values](#//api/name/values) in the collection.

@inlineparam predicateBlock The predicate.

Declared In

FMIceLinkCollection.h

– firstOrDefaultWithPredicateBlock:

Gets the [first](#//api/name/first) [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no such [values](#//api/name/values) in the collection.
- (T)firstOrDefaultWithPredicateBlock:(bool ( ^ ) ( T ))predicateBlock

Parameters

predicateBlock

The predicate.

Discussion

Gets the [first](#//api/name/first) [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no such [values](#//api/name/values) in the collection.

Declared In

FMIceLinkCollection.h

– firstWithPredicate:

Gets the [first](#//api/name/first) [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no such [values](#//api/name/values) in the collection.
- (T)firstWithPredicate:(FMIceLinkFunction1<T,id> *)predicate

Parameters

predicate

The predicate.

Discussion

Gets the [first](#//api/name/first) [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no such [values](#//api/name/values) in the collection.

Declared In

FMIceLinkCollection.h

– firstWithPredicateBlock

Gets the [first](#//api/name/first) [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no such [values](#//api/name/values) in the collection.

@inlineparam predicateBlock The predicate.

- (T ( ^ ) ( bool ( ^ ) ( T ) ))firstWithPredicateBlock

Discussion

Gets the [first](#//api/name/first) [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no such [values](#//api/name/values) in the collection.

@inlineparam predicateBlock The predicate.

Declared In

FMIceLinkCollection.h

– firstWithPredicateBlock:

Gets the [first](#//api/name/first) [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no such [values](#//api/name/values) in the collection.
- (T)firstWithPredicateBlock:(bool ( ^ ) ( T ))predicateBlock

Parameters

predicateBlock

The predicate.

Discussion

Gets the [first](#//api/name/first) [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no such [values](#//api/name/values) in the collection.

Declared In

FMIceLinkCollection.h

– forEachWithCallback:

Executes a callback function once per [value](#//api/name/value).
- (void)forEachWithCallback:(FMIceLinkAction2<T,id> *)callback

Parameters

callback

The callback to execute.

Discussion

Executes a callback function once per [value](#//api/name/value).

Declared In

FMIceLinkCollection.h

– forEachWithCallbackBlock

Executes a callback function once per [value](#//api/name/value).

@inlineparam callbackBlock The callback to execute.

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

Discussion

Executes a callback function once per [value](#//api/name/value).

@inlineparam callbackBlock The callback to execute.

Declared In

FMIceLinkCollection.h

– forEachWithCallbackBlock:

Executes a callback function once per [value](#//api/name/value).
- (void)forEachWithCallbackBlock:(void ( ^ ) ( T , int ))callbackBlock

Parameters

callbackBlock

The callback to execute.

Discussion

Executes a callback function once per [value](#//api/name/value).

Declared In

FMIceLinkCollection.h

– last

Gets the last [value](#//api/name/value). Throws an exception if there are no [values](#//api/name/values) in the collection.
- (T)last

Discussion

Gets the last [value](#//api/name/value). Throws an exception if there are no [values](#//api/name/values) in the collection.

Declared In

FMIceLinkCollection.h

– lastOrDefault

Gets the [last](#//api/name/last) [value](#//api/name/value). Returns a default [value](#//api/name/value) if there are no [values](#//api/name/values) in the collection.
- (T)lastOrDefault

Discussion

Gets the [last](#//api/name/last) [value](#//api/name/value). Returns a default [value](#//api/name/value) if there are no [values](#//api/name/values) in the collection.

Declared In

FMIceLinkCollection.h

– lastOrDefaultWithPredicate:

Gets the [last](#//api/name/last) [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no such [values](#//api/name/values) in the collection.
- (T)lastOrDefaultWithPredicate:(FMIceLinkFunction1<T,id> *)predicate

Parameters

predicate

The predicate.

Discussion

Gets the [last](#//api/name/last) [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no such [values](#//api/name/values) in the collection.

Declared In

FMIceLinkCollection.h

– lastOrDefaultWithPredicateBlock

Gets the [last](#//api/name/last) [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no such [values](#//api/name/values) in the collection.

@inlineparam predicateBlock The predicate.

- (T ( ^ ) ( bool ( ^ ) ( T ) ))lastOrDefaultWithPredicateBlock

Discussion

Gets the [last](#//api/name/last) [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no such [values](#//api/name/values) in the collection.

@inlineparam predicateBlock The predicate.

Declared In

FMIceLinkCollection.h

– lastOrDefaultWithPredicateBlock:

Gets the [last](#//api/name/last) [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no such [values](#//api/name/values) in the collection.
- (T)lastOrDefaultWithPredicateBlock:(bool ( ^ ) ( T ))predicateBlock

Parameters

predicateBlock

The predicate.

Discussion

Gets the [last](#//api/name/last) [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no such [values](#//api/name/values) in the collection.

Declared In

FMIceLinkCollection.h

– lastWithPredicate:

Gets the [last](#//api/name/last) [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no such [values](#//api/name/values) in the collection.
- (T)lastWithPredicate:(FMIceLinkFunction1<T,id> *)predicate

Parameters

predicate

The predicate.

Discussion

Gets the [last](#//api/name/last) [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no such [values](#//api/name/values) in the collection.

Declared In

FMIceLinkCollection.h

– lastWithPredicateBlock

Gets the [last](#//api/name/last) [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no such [values](#//api/name/values) in the collection.

@inlineparam predicateBlock The predicate.

- (T ( ^ ) ( bool ( ^ ) ( T ) ))lastWithPredicateBlock

Discussion

Gets the [last](#//api/name/last) [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no such [values](#//api/name/values) in the collection.

@inlineparam predicateBlock The predicate.

Declared In

FMIceLinkCollection.h

– lastWithPredicateBlock:

Gets the [last](#//api/name/last) [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no such [values](#//api/name/values) in the collection.
- (T)lastWithPredicateBlock:(bool ( ^ ) ( T ))predicateBlock

Parameters

predicateBlock

The predicate.

Discussion

Gets the [last](#//api/name/last) [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no such [values](#//api/name/values) in the collection.

Declared In

FMIceLinkCollection.h

– remove:

Removes a [value](#//api/name/value).
- (bool)remove:(T)value

Parameters

value

The value.

Discussion

Removes a [value](#//api/name/value).

Declared In

FMIceLinkCollection.h

– removeAll

Removes all [values](#//api/name/values).
- (void)removeAll

Discussion

Removes all [values](#//api/name/values).

Declared In

FMIceLinkCollection.h

– removeFirst

Removes the [first](#//api/name/first) [value](#//api/name/value).
- (T)removeFirst

Discussion

Removes the [first](#//api/name/first) [value](#//api/name/value).

Declared In

FMIceLinkCollection.h

– removeFirstWithCondition:

Removes the [first](#//api/name/first) [value](#//api/name/value) that matches a given condition.
- (T)removeFirstWithCondition:(FMIceLinkFunction1<T,id> *)condition

Discussion

Removes the [first](#//api/name/first) [value](#//api/name/value) that matches a given condition.

Declared In

FMIceLinkCollection.h

– removeFirstWithConditionBlock

Removes the [first](#//api/name/first) [value](#//api/name/value) that matches a given condition.
- (T ( ^ ) ( bool ( ^ ) ( T ) ))removeFirstWithConditionBlock

Discussion

Removes the [first](#//api/name/first) [value](#//api/name/value) that matches a given condition.

Declared In

FMIceLinkCollection.h

– removeFirstWithConditionBlock:

Removes the [first](#//api/name/first) [value](#//api/name/value) that matches a given condition.
- (T)removeFirstWithConditionBlock:(bool ( ^ ) ( T ))conditionBlock

Discussion

Removes the [first](#//api/name/first) [value](#//api/name/value) that matches a given condition.

Declared In

FMIceLinkCollection.h

– removeLast

Removes the [last](#//api/name/last) [value](#//api/name/value).
- (T)removeLast

Discussion

Removes the [last](#//api/name/last) [value](#//api/name/value).

Declared In

FMIceLinkCollection.h

– removeLastWithCondition:

Removes the [last](#//api/name/last) [value](#//api/name/value) that matches a given condition.
- (T)removeLastWithCondition:(FMIceLinkFunction1<T,id> *)condition

Discussion

Removes the [last](#//api/name/last) [value](#//api/name/value) that matches a given condition.

Declared In

FMIceLinkCollection.h

– removeLastWithConditionBlock

Removes the [last](#//api/name/last) [value](#//api/name/value) that matches a given condition.
- (T ( ^ ) ( bool ( ^ ) ( T ) ))removeLastWithConditionBlock

Discussion

Removes the [last](#//api/name/last) [value](#//api/name/value) that matches a given condition.

Declared In

FMIceLinkCollection.h

– removeLastWithConditionBlock:

Removes the [last](#//api/name/last) [value](#//api/name/value) that matches a given condition.
- (T)removeLastWithConditionBlock:(bool ( ^ ) ( T ))conditionBlock

Discussion

Removes the [last](#//api/name/last) [value](#//api/name/value) that matches a given condition.

Declared In

FMIceLinkCollection.h

– removeMany:

Removes some [values](#//api/name/values).
- (bool)removeMany:(NSMutableArray *)values

Parameters

values

The values.

Discussion

Removes some [values](#//api/name/values).

Declared In

FMIceLinkCollection.h

– removeSuccess:

Invoked when an element is removed from the collection.
- (void)removeSuccess:(T)value

Parameters

value

The value.

Discussion

Invoked when an element is removed from the collection.

Declared In

FMIceLinkCollection.h

– replace:

Replaces the collection with a new set of [values](#//api/name/values).
- (void)replace:(NSMutableArray *)values

Parameters

values

The values.

Discussion

Replaces the collection with a new set of [values](#//api/name/values).

Declared In

FMIceLinkCollection.h

– setValue:

Sets the [value](#//api/name/value).
- (void)setValue:(T)value

Discussion

Sets the [value](#//api/name/value).

Declared In

FMIceLinkCollection.h

– setValues:

Sets the [values](#//api/name/values).
- (void)setValues:(NSMutableArray *)value

Discussion

Sets the [values](#//api/name/values).

Declared In

FMIceLinkCollection.h

– single

Gets the only [value](#//api/name/value). Throws an exception if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.
- (T)single

Discussion

Gets the only [value](#//api/name/value). Throws an exception if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.

Declared In

FMIceLinkCollection.h

– singleOrDefault

Gets the only [value](#//api/name/value). Returns a default [value](#//api/name/value) if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.
- (T)singleOrDefault

Discussion

Gets the only [value](#//api/name/value). Returns a default [value](#//api/name/value) if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.

Declared In

FMIceLinkCollection.h

– singleOrDefaultWithPredicate:

Gets the only [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.
- (T)singleOrDefaultWithPredicate:(FMIceLinkFunction1<T,id> *)predicate

Discussion

Gets the only [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.

Declared In

FMIceLinkCollection.h

– singleOrDefaultWithPredicateBlock

Gets the only [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.
- (T ( ^ ) ( bool ( ^ ) ( T ) ))singleOrDefaultWithPredicateBlock

Discussion

Gets the only [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.

Declared In

FMIceLinkCollection.h

– singleOrDefaultWithPredicateBlock:

Gets the only [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.
- (T)singleOrDefaultWithPredicateBlock:(bool ( ^ ) ( T ))predicateBlock

Discussion

Gets the only [value](#//api/name/value) that matches the specified predicate. Returns a default [value](#//api/name/value) if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.

Declared In

FMIceLinkCollection.h

– singleWithPredicate:

Gets the only [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.
- (T)singleWithPredicate:(FMIceLinkFunction1<T,id> *)predicate

Discussion

Gets the only [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.

Declared In

FMIceLinkCollection.h

– singleWithPredicateBlock

Gets the only [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.
- (T ( ^ ) ( bool ( ^ ) ( T ) ))singleWithPredicateBlock

Discussion

Gets the only [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.

Declared In

FMIceLinkCollection.h

– singleWithPredicateBlock:

Gets the only [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.
- (T)singleWithPredicateBlock:(bool ( ^ ) ( T ))predicateBlock

Discussion

Gets the only [value](#//api/name/value) that matches the specified predicate. Throws an exception if there are no [values](#//api/name/values) or more than one [value](#//api/name/value) in the collection.

Declared In

FMIceLinkCollection.h

– value

Gets the value.
- (T)value

Discussion

Gets the value.

Declared In

FMIceLinkCollection.h

– valueAtOrDefaultWithIndex:

Gets the [value](#//api/name/value) at the specified index. Returns a default [value](#//api/name/value) if a [value](#//api/name/value) does not exist at that index.
- (T)valueAtOrDefaultWithIndex:(int)index

Parameters

index

The index.

Discussion

Gets the [value](#//api/name/value) at the specified index. Returns a default [value](#//api/name/value) if a [value](#//api/name/value) does not exist at that index.

Declared In

FMIceLinkCollection.h

– valueAtWithIndex:

Gets the [value](#//api/name/value) at the specified index. Throws an exception if a [value](#//api/name/value) does not exist at that index.
- (T)valueAtWithIndex:(int)index

Parameters

index

The index.

Discussion

Gets the [value](#//api/name/value) at the specified index. Throws an exception if a [value](#//api/name/value) does not exist at that index.

Declared In

FMIceLinkCollection.h

– values

Gets the values.
- (NSMutableArray *)values

Discussion

Gets the values.

Declared In

FMIceLinkCollection.h

– whereWithPredicate:

Creates a new collection with [values](#//api/name/values) that match the specified predicate.
- (TCollection)whereWithPredicate:(FMIceLinkFunction2<T,id,id> *)predicate

Parameters

predicate

The predicate.

Discussion

Creates a new collection with [values](#//api/name/values) that match the specified predicate.

Declared In

FMIceLinkCollection.h

– whereWithPredicateBlock

Creates a new collection with [values](#//api/name/values) that match the specified predicate.

@inlineparam predicateBlock The predicate.

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

Discussion

Creates a new collection with [values](#//api/name/values) that match the specified predicate.

@inlineparam predicateBlock The predicate.

Declared In

FMIceLinkCollection.h

– whereWithPredicateBlock:

Creates a new collection with [values](#//api/name/values) that match the specified predicate.
- (TCollection)whereWithPredicateBlock:(bool ( ^ ) ( T , int ))predicateBlock

Parameters

predicateBlock

The predicate.

Discussion

Creates a new collection with [values](#//api/name/values) that match the specified predicate.

Declared In

FMIceLinkCollection.h