T_Cyjb_Collections_Deque_1 - CYJB/Cyjb GitHub Wiki
表示同一任意类型的实例的大小可变的双端队列,并允许使用索引访问队列中的元素。
System.Object
Cyjb.Collections.ObjectModel.ReadOnlyCollectionBase(T)
Cyjb.Collections.Deque(T)
Namespace: Cyjb.Collections
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6
C#
public class Deque<T> : ReadOnlyCollectionBase<T>, IReadOnlyList<T>,
IEnumerable<T>, IEnumerable, IReadOnlyCollection<T>
- T
- 指定队列中的元素的类型。
名称 | 说明 | |
---|---|---|
![]() |
Deque(T)() | 初始化 Deque(T) 类的新实例。 |
![]() |
Deque(T)(IEnumerable(T)) | 使用指定集合的元素初始化 Deque(T) 类的新实例。 |
![]() |
Deque(T)(Int32) | 使用指定的初始容量初始化 Deque(T) 类的新实例。 |
名称 | 说明 | |
---|---|---|
![]() |
Count | 获取当前集合包含的元素数。 (重写 ReadOnlyCollectionBase(T).Count.) |
![]() |
Item(Index) | 获取或设置队列距指定偏移处的元素。 |
![]() |
Item(Int32) | 获取或设置队列距指定偏移处的元素。 |
名称 | 说明 | |
---|---|---|
![]() |
Clear | 从当前集合中移除所有元素。 |
![]() |
Contains | 确定当前集合是否包含指定对象。 (重写 ReadOnlyCollectionBase(T).Contains(T).) |
![]() |
CopyTo | 从特定的 Array 索引处开始,将当前集合 的元素复制到一个 Array 中。 (重写 ReadOnlyCollectionBase(T).CopyTo(T[], Int32).) |
![]() |
EnsureCapacity | 确保队列至少具有指定容量。 |
![]() |
Equals | Determines whether the specified object is equal to the current object. (继承自 Object。) |
![]() |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (继承自 Object。) |
![]() |
GetEnumerator | 返回一个循环访问集合的枚举器。 (重写 ReadOnlyCollectionBase(T).GetEnumerator().) |
![]() |
GetHashCode | Serves as the default hash function. (继承自 Object。) |
![]() |
GetSyncRoot | 获取一个可用于同步对当前集合的访问的对象。 (继承自 ReadOnlyCollectionBase(T)。) |
![]() |
GetType | Gets the Type of the current instance. (继承自 Object。) |
![]() |
MemberwiseClone | Creates a shallow copy of the current Object. (继承自 Object。) |
![]() |
PeekBack | 返回队列末尾处的元素,但不将其移除。 |
![]() |
PeekFront | 返回队列开始处的元素,但不将其移除。 |
![]() |
PopBack() | 删除并返回队列末尾处的元素。 |
![]() |
PopBack(Int32) | 删除队列末尾处指定个数的元素。 |
![]() |
PopFront() | 删除并返回队列开始处的元素。 |
![]() |
PopFront(Int32) | 删除队列开始处指定个数的元素。 |
![]() |
PushBack | 将指定元素添加到队列的末尾。 |
![]() |
PushFront | 将指定元素添加到队列的开始。 |
![]() |
ToArray | 将队列的元素复制到新数组中。 |
![]() |
ToString | Returns a string that represents the current object. (继承自 Object。) |
![]() |
TrimExcess | 如果元素数小于当前容量的 90%,将容量设置为队列中的实际元素数。 |
![]() |
TryPeekBack | 尝试返回队列末尾处的元素,但不将其移除。 |
![]() |
TryPeekFront | 尝试返回队列开始处的元素,但不将其移除。 |
![]() |
TryPopBack | 尝试删除并返回队列末尾处的元素。 |
![]() |
TryPopFront | 尝试删除并返回队列开始处的元素。 |
名称 | 说明 | |
---|---|---|
![]() |
IsDistinct(T) | 判断序列中是否不包含重复元素。 (由 EnumerableUtil 定义。) |
使用循环数组实现。