Class CircularArray<T>
Represents a collection of reusable elements
Inheritance
System.Object
CircularArray<T>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Ladybug
Assembly: ladybug.dll
Syntax
public class CircularArray<T>
Type Parameters
Name | Description |
---|---|
T |
Constructors
| Improve this Doc View SourceCircularArray(Int32)
Creates a new CircularArray
Declaration
public CircularArray(int capacity = 100)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | capacity | Maximum capacity |
Properties
| Improve this Doc View SourceCapacity
Maximum capacity
Declaration
public int Capacity { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Count
Number of current items
Declaration
public int Count { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Item[Int32]
Retrieves the element at the given index
Declaration
public T this[int i] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | i |
Property Value
Type | Description |
---|---|
T |
Start
Current start position
Declaration
public int Start { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceGet()
Retrieves the next item in the collection
Declaration
public T Get()
Returns
Type | Description |
---|---|
T |
Populate<K>()
Populates the collection, filling it to maximum capacity with new item instances
Declaration
public void Populate<K>()
where K : T, new()
Type Parameters
Name | Description |
---|---|
K |