copyWith method

LinkStateAdvertisement<T> copyWith({
  1. T? routerId,
  2. T? networkId,
  3. num? linkCost,
  4. LinkStateType? linkType,
  5. DateTime? timestamp,
  6. int? sequenceNumber,
  7. int? age,
})

Creates a copy with updated values

Implementation

LinkStateAdvertisement<T> copyWith({
  T? routerId,
  T? networkId,
  num? linkCost,
  LinkStateType? linkType,
  DateTime? timestamp,
  int? sequenceNumber,
  int? age,
}) {
  return LinkStateAdvertisement<T>(
    routerId: routerId ?? this.routerId,
    networkId: networkId ?? this.networkId,
    linkCost: linkCost ?? this.linkCost,
    linkType: linkType ?? this.linkType,
    timestamp: timestamp ?? this.timestamp,
    sequenceNumber: sequenceNumber ?? this.sequenceNumber,
    age: age ?? this.age,
  );
}