Class CompressedCollection<T>
The class represents a collection of items. The collection is initialized with a default value. The collection is compressed because on the outside it looks like all indexes have their value set, but in reality, only the values explicitly set by the public API are stored.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Spreadsheet.Expressions.DataStructures
Assembly: Telerik.Windows.Documents.Spreadsheet.dll
Syntax
public class CompressedCollection<T> : IEnumerable<T>, IEnumerable
Type Parameters
T
The value type stored by the collection. |
Constructors
CompressedCollection(Int32, Int32, T)
Initialize a instance of the CompressedCollection class.
Declaration
public CompressedCollection(int rowCount, int columnCount, T defaultValue)
Parameters
System.Int32
rowCount
The number of rows. |
System.Int32
columnCount
The number of columns. |
T
defaultValue
The default value used to initialize all cells of the collection. |
Properties
HasValues
If the collection really has any values.
Declaration
public bool HasValues { get; }
Property Value
System.Boolean
|
Item[Int32, Int32]
Indexer used to access a cell of the collection.
Declaration
public T this[int rowIndex, int columnIndex] { get; set; }
Parameters
System.Int32
rowIndex
The row index of the cell. |
System.Int32
columnIndex
The column index of the cell. |
Property Value
T
|
Length
The total number of items in the collection.
Declaration
public int Length { get; }
Property Value
System.Int32
|
Methods
GetEnumerator()
Enumerates the items of the collection.
Declaration
public IEnumerator<T> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<T>
The enumerator. |
Implements
GetLength(Int32)
Returns the length of the chosen dimension.
Declaration
public int GetLength(int dimension)
Parameters
System.Int32
dimension
The dimension for which to get the length. 0 for rows, 1 for columns. |
Returns
System.Int32
The number of items in the selected dimension. |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator
|