FixedSizeQueue<T>
Namespace: LLama.Common
A queue with fixed storage size. Currently it's only a naive implementation and needs to be further optimized in the future.
1 |
|
Type Parameters
T
Inheritance Object → FixedSizeQueue<T>
Implements IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable
Properties
Item
1 |
|
Property Value
T
Count
Number of items in this queue
1 |
|
Property Value
Capacity
Maximum number of items allowed in this queue
1 |
|
Property Value
Constructors
FixedSizeQueue(Int32)
Create a new queue
1 |
|
Parameters
size
Int32
the maximum number of items to store in this queue
FixedSizeQueue(Int32, IEnumerable<T>)
Fill the quene with the data. Please ensure that data.Count <= size
1 |
|
Parameters
size
Int32
data
IEnumerable<T>
Methods
Enqueue(T)
Enquene an element.
1 |
|
Parameters
item
T
GetEnumerator()
1 |
|
Returns
IEnumerator<T>