Enhanced C#
Language of your choice: library documentation
Public fields | Properties | Public Member Functions | List of all members
Loyc.Collections.Repeated< T > Struct Template Reference

Helper struct. A sequence that stores one value, but acts like a list in which that value is repeated a specified number of times. Returned from Range.Repeat<T>. More...


Source file:
Inheritance diagram for Loyc.Collections.Repeated< T >:
Loyc.Collections.IListAndListSource< T > Loyc.Collections.IRange< T > Loyc.Collections.IIsEmpty Loyc.Collections.IListSource< T > Loyc.Collections.ICollectionAndReadOnly< T >

Remarks

Helper struct. A sequence that stores one value, but acts like a list in which that value is repeated a specified number of times. Returned from Range.Repeat<T>.

Public fields

int _count
 
_value
 

Properties

int Count [get]
 
this[int index] [get]
 
T IList< T >. this[int index] [get, set]
 
bool ICollection< T >. IsReadOnly [get]
 
bool IsEmpty [get]
 
Last [get]
 
First [get]
 
- Properties inherited from Loyc.Collections.IIsEmpty
bool IsEmpty [get]
 

Public Member Functions

 Repeated (T value, int count)
 
TryGet (int index, out bool fail)
 
int IndexOf (T item)
 
IRange< T > IListSource< T >. Slice (int start, int count)
 
Slice_< T > Slice (int start, int count)
 
void IList< T >. Insert (int index, T item)
 
void IList< T >. RemoveAt (int index)
 
void ICollection< T >. Add (T item)
 
void ICollection< T >. Clear ()
 
void ICollection< T >. CopyTo (T[] array, int arrayIndex)
 
bool ICollection< T >. Remove (T item)
 
bool Contains (T item)
 
System.Collections.IEnumerator System.Collections.IEnumerable. GetEnumerator ()
 
IEnumerator< T > GetEnumerator ()
 
PopLast (out bool fail)
 
PopFirst (out bool fail)
 
IFRange< T > ICloneable< IFRange< T > >. Clone ()
 
IBRange< T > ICloneable< IBRange< T > >. Clone ()
 
IRange< T > ICloneable< IRange< T > >. Clone ()
 
Repeated< T > Clone ()
 
- Public Member Functions inherited from Loyc.Collections.IListSource< T >
TryGet (int index, out bool fail)
 Gets the item at the specified index, and does not throw an exception on failure. More...
 
IRange< T > Slice (int start, int count=int.MaxValue)
 Returns a sub-range of this list. More...