This static functional class provides two simple convenience functions. These functions check to determine if a collection actually exists, and if so if it has any entries.
Static Public Member Functions | |
static bool | AreArraysIdentical< T > (T[] firstArray, T[] otherArray) |
Compares all elements in the firstArrray with all the elements in the otherArray, using the Equals function. Unequal sized arrays will immediately return false. If both array references are null, will return true | |
static bool | AreArraysIdentical< T > (T[] firstArray, T[] otherArray, System.Comparison< T > compareFunction) |
Compares all elements in one array with all the elements in the other array, using the compare function. Unequal sized arrays will immediately return false. If both array references are null, will return true | |
static bool | Contains< T > (this IEnumerable< T > list, T value) |
Given the specified enumerable collection, and element value, this function will check to see if any elements in the array have this value. | |
static T | GetCiricularIndexedElement< T > (this List< T > array, int circularIndex) |
Makes indexes to a List "circular", looping around from the end back to the beginning. The current length of the List is used to adjust the provided index parameter, such that it always indexes an actual List element. | |
static T | GetCiricularIndexedElement< T > (this T[] array, int circularIndex) |
Makes indexes to an array "circular", looping around from the end back to the beginning. The current size of the array is used to adjust the provided index parameter, such that it always indexes an actual array element. | |
static bool | IsArrayIdentical< T > (this T[] thisArray, T[] otherArray) |
Compares all elements in the invoking, thisArrray with all the elements in the otherArray, using the Equals function. Unequal sized arrays will immediately return false. If both array references are null, will return true | |
static bool | IsArrayIdentical< T > (this T[] thisArray, T[] otherArray, System.Comparison< T > compareFunction) |
Compares all elements in the invoking, thisArrray, with all the elements in the otherArray, using the compare function. Unequal sized arrays will immediately return false. If both array references are null, will return true | |
static bool | IsArrayNotEmpty< T > (this T[] list) |
Given the specified array this function will check to see if it exists, and if so, if it has any entries. | |
static bool | IsListNotEmpty< T > (this List< T > list) |
Given the specified list this function will check to see if it exists, and if so, if it has any entries. | |
static void | RemoveRangeCircular< T > (this List< T > list, int startIndex, int count) |
Function works much like the normal List Remove Range function except that if the count of elements to remove goes beyond the end of the list. In this case, it will remove the remaining elements from the START of the list, so in total, the specified number of elements will be removed (or the list is empty) | |
static IList | SetIListSize (IList listInterface, int newSize) |
Adjusts the size of the IList provided, to the specified size. If the list is of fixed size it will attempt to create a new IList, of the same implementing type, and assign it's members the same values. | |
static string | ToStringEnumerated< T > (this IEnumerable< T > list) |
Convenience function to get all the items in an array into a single string. | |
static string | ToStringEnumerated< T > (this T[] array) |
Internally casts provided array and invokes ToStringEnumerated < T > (this IEnumerable <T> list) | |