The RandomAccessQueue<(Of <(<'T>)>)> type exposes the following members.
Methods
Name | Description | |
---|---|---|
Add |
Adds an item to the queue
|
|
BinarySearch(T) |
Performs a binary search using IComparable. If the value occurs multiple times,
there is no guarantee as to which index will be returned. If the value does
not occur at all, the bitwise complement of the first index containing a larger
value is returned (or the bitwise complement of the size of the queue if the value
is larger than any value in the queue). This is the location at which the value should
be inserted to preserve sort order. If the list is not sorted according to
the appropriate IComparable implementation before this method is calling, the result
is not guaranteed. The value passed in must implement IComparable, unless it is null.
The IComparable.CompareTo method will be called on the value passed in, with the
values in the queue as parameters, rather than the other way round. No test is made
to make sure that the types of item are the same - it is up to the implementation of
IComparable to throw an exception if incomparable types are presented.
A null reference is treated as being less than any item, (so passing in null will always
return 0 or -1). The implementation of IComparable is never asked to compare to null.
|
|
BinarySearch(T, IComparer<(Of <<'(T>)>>)) |
Performs a binary search using the specified IComparer. If the value occurs multiple times,
there is no guarantee as to which index will be returned. If the value does
not occur at all, the bitwise complement of the first index containing a larger
value is returned (or the bitwise complement of the size of the queue if the value
is larger than any value in the queue). This is the location at which the value should
be inserted to preserve sort order. If the list is not sorted according to
the appropriate IComparer implementation before this method is calling, the result
is not guaranteed. The CompareTo method will be called on the comparer passed in, with the
specified value as the first parameter, and values in the queue as the second parameter,
rather than the other way round.
While a null reference should be treated as being less than any object in most
implementations of IComparer, this is not required by this method. Any null references
(whether in the queue or the specified value itself) are passed directly to the CompareTo
method. This allow for IComparers to reverse the usual order, if required.
|
|
BinarySearch(T, Comparison<(Of <<'(T>)>>)) |
Performs a binary search using the specified Comparison. If the value occurs multiple times,
there is no guarantee as to which index will be returned. If the value does
not occur at all, the bitwise complement of the first index containing a larger
value is returned (or the bitwise complement of the size of the queue if the value
is larger than any value in the queue). This is the location at which the value should
be inserted to preserve sort order. If the list is not sorted according to
the appropriate IComparer implementation before this method is calling, the result
is not guaranteed. The CompareTo method will be called on the comparer passed in, with the
specified value as the first parameter, and values in the queue as the second parameter,
rather than the other way round.
While a null reference should be treated as being less than any object in most
implementations of IComparer, this is not required by this method. Any null references
(whether in the queue or the specified value itself) are passed directly to the CompareTo
method. This allow for Comparisons to reverse the usual order, if required.
|
|
Clear |
Clears the queue without resizing the buffer
|
|
Clone |
Strongly typed version of ICloneable.Clone. Creates a new queue
with the same contents as this queue.
The queues are separate, however - adding an item to the returned
queue doesn't affect the current queue or vice versa.
A new sync root is also supplied.
|
|
Contains |
Returns whether or not the queue contains the given item,
using the default EqualityComparer if the item to find is
non-null.
|
|
CopyTo(Array, Int32) |
Copies the elements of the queue to the given array, beginning at
the specified index in the array.
|
|
CopyTo(array<T>[]()[][], Int32) |
Copies the elements of the queue to the given array, beginning at
the specified index in the array.
|
|
Dequeue |
Removes an T from the start of the queue, returning it.
|
|
Enqueue(T) |
Adds an item to the end of the queue.
|
|
Enqueue(T, Int32) |
Adds an object at the specified index.
|
|
GetEnumerator |
Returns an enumerator that can iterate through the queue.
Note that due to the way C# 2.0 iterators work, we cannot spot changes
to the queue after the enumerator was fetched but before MoveNext() is first
called.
|
|
Remove |
Removes the given item from the queue, if it is present. The first
equal value is removed.
|
|
RemoveAt |
Removes an item at the given index and returns it.
|
|
TrimToSize |
Resizes the buffer to just fit the current number of items in the queue.
The buffer size is never set to less than the default capacity, however.
|
Extension Methods
Name | Description | |
---|---|---|
ConvertTo(Type) | Overloaded.
Converts a source to the given type.
(Defined by ObjectExtension.) |
|
ConvertTo(Type, TypeConverter) | Overloaded.
Converts a source to the given type.
(Defined by ObjectExtension.) |
|
ConvertTo(Type, Boolean) | Overloaded.
Converts a source to the given type.
(Defined by ObjectExtension.) |
|
ConvertTo(Type, TypeConverter, Boolean) | Overloaded.
Converts a source to the given type.
(Defined by ObjectExtension.) |
|
ConvertTo<(Of <<'(T>)>>)()()()() | Overloaded.
Converts a source to the given type.
(Defined by ObjectExtension.) |
|
ConvertTo<(Of <<'(T>)>>)(TypeConverter) | Overloaded.
Converts a source to the given type.
(Defined by ObjectExtension.) |
|
GetCurrentStackTrace |
Gets current stack trace information.
(Defined by ObjectExtension.) |
|
GetDebugInformation |
Gets the debug information for currently executing code.
(Defined by ObjectExtension.) |
|
GetExecutingMethodName |
Gets the executing method name.
(Defined by ObjectExtension.) |
|
GetPropertyType |
Gets a property type.
(Defined by ObjectExtension.) |
|
GetPropertyValue |
Gets a property or field value from the object (Dot notation enabled).
(Defined by ObjectExtension.) |
|
PropertyExists |
Check if property exists.
(Defined by ObjectExtension.) |
|
SetPropertyValue |
Sets a property or field value to the object (Dot notation enabled).
(Defined by ObjectExtension.) |