This class contains an internal array, and an indexer override to access the array elements. All index values passed in go through the internal "wrap" function to ensure it remains in bounds as a valid index into the array. Also, some public index adjusting functions are provided: one to increment it, one to decrement it, and one to add a specified offset amount. Lastly, it provides and Enumerator, which allows one to "foreach" through all the elements in the internal array.
|
| CircularArray (int size) |
| All CircularArrays must be at least 1 element in size, or an exception is thrown.
|
|
int | Add (object value) |
| Circular array is static, and does not support this function.
|
|
void | Add (T item) |
| Circular array is static, and does not support this function.
|
|
void | Clear () |
| Circular array is static, and does not support this function.
|
|
bool | Contains (object value) |
| Circular array is static, and does not support this function.
|
|
bool | Contains (T item) |
| Checks the array contents to see if the specified item is one of the elements it contains.
|
|
void | CopyTo (Array array, int index) |
| Circular array is static, and does not support this function.
|
|
void | CopyTo (T[] array, int arrayIndex) |
| Copies the circular array into the specified array, starting at the specified index.
|
|
void | DecIndex (ref int index) |
| Decrements, by one, then wraps the provided index. The value passed in is adjusted directly via the ref parameter keyword. No value is returned.
|
|
int | GetIndexDifference (int earlierIndex, int laterIndex) |
|
void | IncIndex (ref int index) |
| Increments, by one, then wraps the provided index. The value passed in is adjusted directly via the ref parameter keyword. No value is returned.
|
|
int | IndexOf (object value) |
| Circular array is static, and does not support this function.
|
|
int | IndexOf (T item) |
| IList function used to find the index of a specified element
|
|
void | Insert (int index, object value) |
| Circular array is static, and does not support this function.
|
|
void | Insert (int index, T item) |
| Circular array is static, and does not support this function.
|
|
void | OffsetIndexBy (ref int index, int offset) |
|
void | Remove (object value) |
| Circular array is static, and does not support this function.
|
|
bool | Remove (T item) |
| Circular array is static, and does not support this function.
|
|
void | RemoveAt (int index) |
| Circular array is static, and does not support this function.
|
|
|
virtual int | Count [get] |
| Number of elements in the circular array
|
|
bool | IsFixedSize [get] |
| IList interface function. Returns true because the list size cannot be modified.
|
|
bool | IsReadOnly [get] |
| Implementation of ICollectable- always returns true, since the size of the array cannot be adjusted after creation.
|
|
bool | IsSynchronized [get] |
| ICollection interface function. Returns isSyncronized state of the internal array
|
|
object | SyncRoot [get] |
| ICollection interface function. Returns SyncRoot object of the internal array
|
|
virtual T | this[int index] [get, set] |
| Index lookup into the array. The index value passed in here does NOT need to be valid, it will be internally wrapped if it is. After wrapping the provided index, it will use that to lookup to get/set the appropriate value from the internal array.
|
|