PeanutButter
Loading...
Searching...
No Matches
PeanutButter.Utils.CircularList< T > Class Template Reference

Represents a list which circles back on itself such that enumerating over it produces an unending series. EG: if it was created with the numbers [ 1, 2, 3 ], then enumeration would yield [ 1, 2, 3, 1, 2, 3, 1 ... ] For all operations except enumeration and indexing, the collection will behave as an infinitely repeating series. For obvious reasons, CopyTo will copy the internal, limited collection. More...

Inheritance diagram for PeanutButter.Utils.CircularList< T >:
PeanutButter.Utils.ICircularList< T >

Public Member Functions

 CircularList ()
 CircularList (IEnumerable< T > items)
 Initializes the CircularList with some items.
IEnumerator< T > GetEnumerator ()
void Add (T item)
void Clear ()
bool Contains (T item)
void CopyTo (T[] array, int arrayIndex)
bool Remove (T item)
int IndexOf (T item)
void Insert (int index, T item)
void RemoveAt (int index)

Properties

int Count [get]
IEnumerable< T > Items [get]
 Access to just the items in the store, without circular logic.
int ItemCount [get]
 The actual count of items in the internal store.
bool IsReadOnly [get]
this[int index] [get, set]

Detailed Description

Represents a list which circles back on itself such that enumerating over it produces an unending series. EG: if it was created with the numbers [ 1, 2, 3 ], then enumeration would yield [ 1, 2, 3, 1, 2, 3, 1 ... ] For all operations except enumeration and indexing, the collection will behave as an infinitely repeating series. For obvious reasons, CopyTo will copy the internal, limited collection.

Member Function Documentation

◆ CircularList()

PeanutButter.Utils.CircularList< T >.CircularList ( IEnumerable< T > items)

Initializes the CircularList with some items.

Parameters
items

Property Documentation

◆ ItemCount

int PeanutButter.Utils.CircularList< T >.ItemCount
get

The actual count of items in the internal store.

Implements PeanutButter.Utils.ICircularList< T >.

◆ Items

IEnumerable<T> PeanutButter.Utils.CircularList< T >.Items
get

Access to just the items in the store, without circular logic.

Implements PeanutButter.Utils.ICircularList< T >.


The documentation for this class was generated from the following file:
  • source/Utils/PeanutButter.Utils/CircularList.cs