GH_ListUtil

public sealed class GH_ListUtil
Provides utilities for dealing with list of Data from input parameters.

Methods

CountNonNullRefs<T>

#
Count all object references in L
public static int CountNonNullRefs<T>(
List<T>
L
List to parse
)
Number of proper objects in L

CountNullRefs<T>

#
Count all null references in L
public static int CountNullRefs<T>(
List<T>
L
List to parse
)
Number of nulls in L

EnsureNonNullCount<T>

#
Tests a list to see if it contains sufficient non-null references.
public static bool EnsureNonNullCount<T>(
List<T>
L,
List to parse
N
)
True if L contains N or more non-null references.

FirstNonNullItem<T>

#
Returns the index of the first non-null item in a list.
public static int FirstNonNullItem<T>(
List<T>
L
List to parse.
)
The index of the first non-null item or -1 if no object reference could be found.

RemoveNullRefs<T>

#
Remove all null references from a list of items.
public static List<T> RemoveNullRefs<T>(
List<T>
L
List to filter
)
List containing only non-null items. References are shared with L