Class FixedQueue<T>
Queue with a fixed size
Inherited Members
Namespace: MLAPI.Collections
Assembly: Unity.Multiplayer.MLAPI.Runtime.dll
Syntax
public sealed class FixedQueue<T>
Type Parameters
Name | Description |
---|---|
T | The type of the queue |
Constructors
FixedQueue(int)
Creates a new FixedQueue with a given size
Declaration
public FixedQueue(int maxSize)
Parameters
Type | Name | Description |
---|---|---|
int | maxSize | The size of the queue |
Properties
Count
The amount of enqueued objects
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int |
this[int]
Gets the element at a given virtual index
Declaration
public T this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | index | The virtual index to get the item from |
Property Value
Type | Description |
---|---|
T | The element at the virtual index |
Methods
Dequeue()
Dequeues an object
Declaration
public T Dequeue()
Returns
Type | Description |
---|---|
T |
ElementAt(int)
Gets the element at a given virtual index
Declaration
public T ElementAt(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The virtual index to get the item from |
Returns
Type | Description |
---|---|
T | The element at the virtual index |
Enqueue(T)
Enqueues an object
Declaration
public bool Enqueue(T t)
Parameters
Type | Name | Description |
---|---|---|
T | t |
Returns
Type | Description |
---|---|
bool |