Generated by DocFX

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 Source

CircularArray(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 Source

Capacity

Maximum capacity

Declaration
public int Capacity { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Count

Number of current items

Declaration
public int Count { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

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
| Improve this Doc View Source

Start

Current start position

Declaration
public int Start { get; set; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

Get()

Retrieves the next item in the collection

Declaration
public T Get()
Returns
Type Description
T
| Improve this Doc View Source

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