|
Joutsen v0.5.0+12-g5dd5f7e
|
Classes | |
| class | RingBufferEnumerator |
| The enumerator implementation for the RingBuffer. More... | |
Public Member Functions | |
| RingBuffer (int capacity) | |
| Creates a new buffer with the given capacity. More... | |
| RingBuffer (SCG.IEnumerable< ItemType > enumerable, int capacity) | |
| Creates a new buffer with the given capacity and initial items. More... | |
| ItemType | Add (ItemType value) |
| Adds a value to the buffer. More... | |
| SCG.IEnumerable< ItemType > | Add (SCG.IEnumerable< ItemType > values) |
| Adds multpile values to the buffer. More... | |
| bool | RemoveLatest () |
| Removes the last added value in the buffer. More... | |
| bool | RemoveOldest () |
| Removes the oldest value in the buffer. More... | |
| void | Clear () |
| Clear the buffer of all values. More... | |
| SCG.IEnumerator< ItemType > | GetEnumerator () |
| Get an Enumerator to iterate over the values of the buffer. More... | |
| override String | ToString () |
Public Member Functions inherited from Joutsen.Collections.Generic.Indexable< int, ItemType > | |
| IndexType | IndexOf (ItemType item) |
| Fetches the index of an itemin the list. More... | |
| IndexType | IndexOf (ItemType item, IEqualityComparer< ItemType > comparer) |
| Fetches the index of an item in the list using a custom comparer. More... | |
| void | Enqueue (ItemType item) |
| Adds an item to the front of the queue. More... | |
| void | Enqueue (SCG.IEnumerable< ItemType > items) |
| Adds a number of items to the front of the queue. More... | |
| ItemType | Dequeue () |
| Fetches and removes the last item in the queue. More... | |
| ItemType | Peek () |
| Fetches the last value in the queue without removing it. More... | |
| void | Clear () |
| Removes all the items from the Queue. More... | |
| bool | Contains (ItemType item, SCG.IEqualityComparer< ItemType > comparer) |
| Checks if an item is part of the collection. More... | |
| void | Add (SCG.IEnumerable< ItemType > items) |
| Adds multiple items to the collection. More... | |
Protected Member Functions | |
| ItemType | GetValueAt (int index) |
| void | SetValueAt (int index, ItemType value) |
Properties | |
| int | Capacity [get] |
| The maximum number of values this buffer can contain. More... | |
| int | Count [get] |
| The actual number of values this buffer contains. More... | |
| ItemType | this[int index] [get] |
| Fetches the value at a certain position in the buffer. More... | |
Properties inherited from Joutsen.Collections.Generic.Indexable< int, ItemType > | |
| int | Count [get] |
| Determines the number of values in the list. More... | |
| ItemType | this[IndexType index] [get] |
| Fetches the value associated with the index. More... | |
Properties inherited from Joutsen.Collections.Generic.Queue< ItemType > | |
| int | Count [get] |
| The number of elements in the queue. More... | |
| Joutsen.Collections.Generic.RingBuffer< ItemType >.RingBuffer | ( | int | capacity | ) |
Creates a new buffer with the given capacity.
| capacity | the number of values the buffer can contain without overwriting the oldest values |
| Joutsen.Collections.Generic.RingBuffer< ItemType >.RingBuffer | ( | SCG.IEnumerable< ItemType > | enumerable, |
| int | capacity | ||
| ) |
Creates a new buffer with the given capacity and initial items.
| enumerable | the items that should be in the buffer initially. If the number of items exceeds the capacity the first items will be items will be replaced by the later ones |
| capacity | the number of values the buffer can contain without overwriting the oldest values |
| ItemType Joutsen.Collections.Generic.RingBuffer< ItemType >.Add | ( | ItemType | value | ) |
Adds a value to the buffer.
| value | the value that is added |
| SCG.IEnumerable< ItemType > Joutsen.Collections.Generic.RingBuffer< ItemType >.Add | ( | SCG.IEnumerable< ItemType > | values | ) |
Adds multpile values to the buffer.
| values | the values that are added. If the number of values exceeds the capacity the first items will be items will be replaced by the later ones |
Implements Joutsen.Collections.Generic.Collection< ItemType >.
| void Joutsen.Collections.Generic.RingBuffer< ItemType >.Clear | ( | ) |
Clear the buffer of all values.
Implements Joutsen.Collections.Generic.Queue< ItemType >.
| SCG.IEnumerator< ItemType > Joutsen.Collections.Generic.RingBuffer< ItemType >.GetEnumerator | ( | ) |
Get an Enumerator to iterate over the values of the buffer.
|
protected |
| bool Joutsen.Collections.Generic.RingBuffer< ItemType >.RemoveLatest | ( | ) |
Removes the last added value in the buffer.
| bool Joutsen.Collections.Generic.RingBuffer< ItemType >.RemoveOldest | ( | ) |
Removes the oldest value in the buffer.
|
protected |
| override String Joutsen.Collections.Generic.RingBuffer< ItemType >.ToString | ( | ) |
|
get |
The maximum number of values this buffer can contain.
|
get |
The actual number of values this buffer contains.
Implements Joutsen.Collections.Generic.Queue< ItemType >.
|
get |
Fetches the value at a certain position in the buffer.
| index | the position of the data to fetch |