SharedMultiQueueImage<DataType extends Object> constructor
Creates a shared multi-queue image.
Implementation
SharedMultiQueueImage({
required this.capacity,
required Iterable<Iterable<DataType>> queues,
}) : queues = List.unmodifiable(
queues.map(List<DataType>.unmodifiable),
) {
if (capacity <= 0 || this.queues.isEmpty) {
throw ArgumentError('Capacity and queue count must be positive.');
}
if (occupancy > capacity) {
throw ArgumentError(
'Queue occupancy $occupancy exceeds capacity $capacity.');
}
}