Class PartitionerCollection<T>
- Namespace
- Cuemon.Collections.Generic
- Assembly
- Cuemon.Core.dll
Represents a generic and read-only collection that is iterated in partitions. Implements the PartitionerEnumerable<T> Implements the IReadOnlyCollection<T>
public class PartitionerCollection<T> : PartitionerEnumerable<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
T
The type of elements in the collection.
- Inheritance
-
PartitionerCollection<T>
- Implements
-
IEnumerable<T>
- Inherited Members
Constructors
PartitionerCollection(ICollection<T>, Int32)
Initializes a new instance of the PartitionerCollection<T> class.
public PartitionerCollection(ICollection<T> source, int partitionSize = 128)
Parameters
source
ICollection<T>The sequence to iterate in partitions.
partitionSize
Int32The size of the partitions.
Properties
Count
Gets the total number of elements in the sequence before partitioning is applied.
public int Count { get; }
Property Value
- Int32
The total number of elements in the sequence before partitioning is applied.
PartitionsCount
Gets the total amount of partitions for the elements in this sequence.
public int PartitionsCount { get; }
Property Value
- Int32
The total amount of partitions for the elements in this sequence.
Remaining
Gets the number of elements remaining in the partitioned sequence.
public int Remaining { get; }
Property Value
- Int32
The number of elements remaining in the partitioned sequence.