load method

  1. @override
void load(
  1. covariant MissStatusTableImage<LineAddressType, TransactionTagType, MetadataType> image
)
override

Replaces model state from a compatible image.

Implementation

@override
void load(
    MissStatusTableImage<LineAddressType, TransactionTagType, MetadataType>
        image) {
  if (image.capacity != capacity ||
      image.entries
          .whereType<
              MissStatusEntryImage<LineAddressType, TransactionTagType,
                  MetadataType>>()
          .any((entry) => entry.mergeCount > maximumMerges)) {
    throw ArgumentError(
        'Image capacity and merge counts must fit this model.');
  }
  _entries = List<
      MissStatusEntryImage<LineAddressType, TransactionTagType,
          MetadataType>?>.from(image.entries);
}