DequeT Class |
Namespace: DigitalRune.Collections
public class Deque<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, ICollection
The DequeT type exposes the following members.
Name | Description | |
---|---|---|
DequeT |
Initializes a new instance of the DequeT class that is empty and has the
default initial capacity.
| |
DequeT(IEnumerableT) |
Initializes a new instance of the DequeT class that contains elements copied
from the specified collection and has sufficient capacity to accommodate the number of
elements copied.
| |
DequeT(Int32) |
Initializes a new instance of the DequeT class is empty and has the
specified initial capacity.
|
Name | Description | |
---|---|---|
Clear |
Removes all items from the DequeT.
| |
Contains |
Determines whether the DequeT contains a specific value.
| |
CopyTo | ||
DequeueHead |
Removes and returns the object at the beginning of the DequeT.
| |
DequeueTail |
Removes and returns the object at the end of the DequeT.
| |
EnqueueHead |
Adds an object to the beginning of the DequeT.
| |
EnqueueTail |
Adds an object to the end of the DequeT.
| |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetEnumerator |
Returns an enumerator that iterates through the collection.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IndexOf |
Determines the index of a specific item in the DequeT.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToArray |
Copies the DequeT elements to a new array.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
TrimExcess |
Sets the capacity to the actual number of elements in the DequeT, if that
number is less than 90 percent of current capacity.
|
Name | Description | |
---|---|---|
AddRangeT |
Adds the specified items to the ICollectionT.
(Defined by CollectionHelper.) | |
DoT(ActionT) | Overloaded.
Performs the given action on each element in a sequence when it is enumerated.
(Defined by LinqHelper.) | |
DoT(ActionT, Int32) | Overloaded.
Performs the given action on each element (incorporating its index) in a sequence when it is
enumerated.
(Defined by LinqHelper.) | |
ForEachT(ActionT) | Overloaded.
Immediately performs the given action on each element in a sequence.
(Defined by LinqHelper.) | |
ForEachT(ActionT, Int32) | Overloaded.
Immediately performs the given action on each element (incorporating its index) in a
sequence.
(Defined by LinqHelper.) | |
IndexOfT |
Returns the index of the first element in a sequence that satisfies the specified condition.
(Defined by LinqHelper.) |
Name | Description | |
---|---|---|
Count |
Gets the number of items contained in the DequeT.
| |
Head |
Gets or sets the object at the beginning of the DequeT.
| |
Item |
Gets or sets the item at the specified index.
| |
Tail |
Gets or sets the object at the end of the DequeT.
|
Name | Description | |
---|---|---|
ICollectionTAdd |
Adds an item to the ICollectionT.
| |
ICollectionCopyTo | ||
IEnumerableTGetEnumerator |
Returns an enumerator that iterates through the collection.
| |
IEnumerableGetEnumerator |
Returns an enumerator that iterates through a collection.
| |
IListTInsert |
Inserts an item into the IListT at the specified index.
| |
ICollectionTIsReadOnly |
Gets a value indicating whether the ICollectionT is read-only.
| |
ICollectionIsSynchronized |
Gets a value indicating whether access to the ICollection is synchronized
(thread safe).
| |
ICollectionTRemove |
Removes the first occurrence of a specific object from the ICollectionT.
| |
IListTRemoveAt |
Removes the item at the specified index from the IListT.
| |
ICollectionSyncRoot |
Gets an object that can be used to synchronize access to the ICollection.
|
A deque is similar to a queue except that objects can inserted and removed at both ends. The capacity of a DequeT is the number of elements the DequeT can hold. As elements are added to a DequeT, the capacity is automatically increased as required by reallocating the internal array. The capacity can be decreased by calling TrimExcess.
DequeT accepts as a valid value for reference types and allows duplicate elements.