CollectionsUtil
Public / Methods
BinarySearch
2 overloads
Runs a binary search for value in in the given array.
Runs a binary search for value in in the given array.
Concatenate
4 overloads
Concatenates the given array elements.
Concatenates the given array elements.
Concatenates the given array elements.
Concatenates the given array elements.
EqualsArray
Checks if the given arrays are equal.
The given array references are equal if one of the following conditions is true:
-
They refer to the same array instance.
-
They are both
null
. -
The two arrays contain the same sequence of elements, where element equality is defined by the given equals opt delegate.
EqualsCollection
Checks if the given collections are equal.
The given collection references are equal if one of the following conditions is true:
-
They refer to the same collection instance.
-
They are both
null.
-
first in contains all elements of second in and vice-versa, which includes the case that both collections are empty.
EqualsList
Checks if the given lists are equal.
The given list references are equal if one of the following conditions is true:
-
They refer to the same list instance.
-
They are both
null.
-
The two lists contain the same sequence of elements, where element equality is determined by the IEquatable implementation of the given IVectorConst objects.
GrowUntil
Proportionally grows the given array until its length is equal to or greater than the specified length.
The new array length is computed as follows:
newLength := max(length, currentLength * 5 / 4)
where newLength
is the length of the returned array, length
is the value of the length in parameter and currentLength
is the length of the given array in.
If count in is greater than zero, all array elements in the range [0..count-1]
are copied from the given array in to the newly allocated one.
IndexOf
2 overloads
Finds the smallest index of the array element that is equal to the given value.
Finds the smallest index of the array element that is equal to the given value.
Sort
2 overloads
Sorts the given array range.
The method uses an unstable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
Sorts the given array range.
The method uses an unstable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
SortIndex
2 overloads
Sorts the given array range.
The method uses a stable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
Sorts the given array range.
The method uses a stable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
SortList
2 overloads
Sorts the given list range.
The method uses an unstable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
Sorts the given list range.
The method uses an unstable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
Wrap
2 overloads
Returns a new list that initially holds the given element.
Returns a IVectorConst object that wraps the given array.
The list will use the given array, no elements will be copied.